Cannot Login After Using Kuser to setup Accounts

Matthew Seaman m.seaman at infracaninophile.co.uk
Wed May 19 08:22:48 PDT 2004


On Wed, May 19, 2004 at 09:23:24AM -0500, Mark Teel wrote:
> On a fresh install of FreeBSD 5.2, after I add a user via kuser, when I 
> logout I cannot log back in!
> I get a message stating that the "accound" has expired, even for the 
> root user.
> 
> Please help as this has rendered my system unusable.

Hmmm... This sounds like a bug in KDE that was fixed some months ago.
It would scramble the contents of the /etc/master.passwd file.

To get the system back into a working state, reboot into single user
mode (ie. wait until the 10 second countdown before booting the
kernel, hit a key to interrupt and then type 'boot -s' and then just
hit return when prompted to choose a shell.

Now you should be able to restore the master.passwd file from the
backup copy automatically kept in /var/backups.  Try the following
series of commands:

    # fsck -p
    # swapon -a
    # mount -a
    # cd /etc
    # mv master.passwd master.passwd-`date +%Y%m%d`
    # cp /var/backups/master.passwd.bak master.passwd
    # pwd_mkdb 
    # reboot

That should restore the password file to the state it was before you
tried the changes that caused all of the trouble, and you should now
be able to log in.  If you haven't got a good copy of a password file
in /var/backups, you can use the default installation password file
from /usr/src/etc/master.passwd instead, but remember to set a root
password immediately after you copy it into /etc.

Once you're back up and running properly, update your ports tree using
cvsup(1) and install the latest versions of the KDE software -- using
portupgrade(1) [from the sysutils/portupgrade port] is probably the
most pleasant way to do that, but be sure and check in
/usr/ports/UPDATING to see if there are any special measures you need
to take.  Or you can grab precompiled packages from the FreeBSD FTP
servers.

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20040519/b3491fd6/attachment.bin


More information about the freebsd-questions mailing list