Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Jan 2004 17:56:56 -0500
From:      Dany <dany_list@natzo.com>
To:        Robert Fitzpatrick <robert@webtent.com>, freebsd-questions@freebsd.org
Subject:   Re: Root lost after KDE user manager change
Message-ID:  <400C60B8.5080100@natzo.com>
In-Reply-To: <1074552510.11638.119.camel@columbus>
References:  <1074552510.11638.119.camel@columbus>

next in thread | previous in thread | raw e-mail | index | archive | help
Robert Fitzpatrick wrote:

>On 5.2, I install, startx, go in to the user manager and set my admin
>user created during installation to the wheel group, exit and save
>changes. Now I can't login as root after logging out. I think this
>happens no matter what changes you do in the user manager, once saved,
>root is gone. Does not show up in user list to start with. This is a
>brand new install, thank you, so I did it again just to be sure that was
>all I did. Is this well known?
>
>  
>
there is a bug in Kuser, it resets the "expired flag" for all users. To 
log in without root password you should :

While the system is booting and you see something like this:

Hit [ENTER} to boot immediately, or any other key for command prompt. 
Booting [kernel] in 8 seconds.....

Hit any key except the enter key!
You should get a prompt. At the prompt, type:

 >unload all
 >load kernel
 >boot -s

Let the boot process continue until it asks you for a shell. Then just 
hit Enter for 'sh'. At this time, only your root partition is mounted. 
You will need to mount your /usr partition so you can use the 'passwd' 
command. For example:

mount /dev/ad0s1c /usr

To make your root partition read-write, you will need to execute this 
command:

mount -u /

The root partition should now be mounted read-write. Now you can use 
'passwd' command to change the root password.

Edit /etc/master.passwd (using ee for example) and reset all the 
"expiration flags" to 0 (they should show -1)
# passwd root
# pwd_mkdb /etc/master.passwd

Then if I remember you can just type boot.

PS: I've collected the above information from forums and mailing lists. 
Sorry for the lack of copyright notice.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?400C60B8.5080100>