Reset FreeBSD root password

I have always attempted to have strong secure passwords, I usually pick something 12-15 characters long with a mixture of letters (both uppercase and lowercase), number, and symbols all mixed together. This makes my password quite difficult to guess. One problem that I have found is that I don’t have to deal with my servers on a daily basis. Since my password are so complex, I usually forget what they are. Now, I simply keep a server log (a 3 ring binder) that keeps track of all my passwords. But until then, I kept needing to reset my passwords.

To reset your FreeBSD password simple boot the system into single user mode (done in one of two ways; first, if you are using FreeBSD 5.4 or earlier, you simple press the space bar at the appropirate time, which the computer will tell you. Then simple type in boot -s; second, simply select option#four from the boot up menu, it says boot into single user mode.

The system will prompt for the shell you want to use, simple choose the default /bin/sh this will boot the system to a command prompt. Now enter the following commands in sequence:

mount -u /

mount -a

passwd (It will prompt for a new root password, enter it twice here.)

sync; sync

reboot

You will now have root access to you system once more. Good luck

Leave a Reply


Switch to our mobile site