Blog Archives

FreeBSD – Reset password

Three steps to change root password in FreeBSD:

Step 1: Boot in single user mode

As the operating system is starting, it will display the following message:
Hit [Enter] to boot immediately, or any other key for command prompt.
Booting [kernel] in 10 seconds…
You should now press the space bar, and you will see the following message:
Type ‘?’ for a list of commands, or ‘help’ for more detailed help.
# boot -s
to start FreeBSD in single user mode. After the system boots, you should see the statement:
Enter full pathname of shell or RETURN for /bin/sh:
Press the enter key and you will have a # prompt.

Step 2: Mount the filesystems

At the command prompt, issue the mount command. This command will mount all the filesystems listed in your /etc/fstab file.
# mount -t ufs -a

Step 3: Change the root password

Issue the passwd command and you will be prompted to enter a new password for the root account.

# passwd

New password:_
Retype new password:_
passwd: updating the database…
passwd: done

# exit