So, if you happened to ever forget the root password for one of your FreeBSD servers, fear not, you can reset it! Well, of course if you have access to boot the server into single user mode of course! ;)
The process is quick and painless; select the default shell once in single user mode (/bin/sh). After that just enter these commands to change the root password:
# mount -u /
# mount -a
# passwd
Obviously, if you've used
passwd
before it'll prompt you for the new password and to confirm. After that, all you need to do is exit
or sync;sync; reboot
. That's it. Cheers!
No comments:
Post a Comment