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.
ok
# 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

Advertisements

Posted on 1 July 2012, in elguber, unix and tagged , . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: