I got lock out from my root account

Matthew Seaman matthew at viriconium.plasm.demon.co.uk
Tue Nov 6 07:37:35 GMT 2001

On Tue, Nov 06, 2001 at 11:13:43AM +0800, Christian Chang wrote:
> I think someone had change my root passwd, i can't seem to log in to
> my system, im using freebsd, is there a backdoor in which i can
> retrieve or reset my root passwd.

Reboot into single user mode, which will probably let you in as root
without a password:

Ctrl-Alt-F1	to switch out of X windows, if necessary
Ctrl-Alt-Del	to reboot

when you get the 10 second countdown, hit space then

boot -s

Hit return when prompted about the shell.  Once you're in run these

fsck -p		clean up filesystems in case of unclean shutdown
mount -a	mount all filesystems and switch root fs to read/write

You can now either edit /etc/master.passwd using vipw or set a new
password with the passwd(1) command.

If you've set things up so that you need a password to get into single
user mode, then you're going to have to boot from the installation
media to do that.  But that's an e-mail for another day.


Dr Matthew J Seaman MA, D.Phil.                          26 The Paddocks
                                                         Savill Way
Tel: +44 1628 476614                                     Marlow
Fax: +44 0870 0522645                                    Bucks., SL7 1TH UK

More information about the Ukfreebsd mailing list