1. Start FreeBSD server
2. Enter key at boot loader
At Welcome to FreeBSD! boot menu press spacebar key to pause default booting
Type number 4 key (type 4 number) to boot into single user mode
3. Press Enter Key, When prompted Enter full pathname of shell or RETURN for /bin/sh:
4. You need to remount / (root) file system in read and write mode with mount command, type the following commands:
# mount -u /
# mount -a
5.restoring /etc/master.passwd
#cp /var/backups/master.passwd.bak /etc/master.passwd
#pwd_mkdb -C /etc/master.passwd
#pwd_mkdb -p /etc/master.passwd
#pwd_mkdb /etc/master.passwd
6. change the root password
#passwd root
7. reboot ...
http://www.cyberciti.biz/tips/howto-freebsd-reset-recover-root-password.html
No comments:
Post a Comment