Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a FreeBSD box which I forgot the root password to. I do have physical access, so I can reboot the box if I need to.

How do I reset my password?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

There are a few Steps needed:

  1. Start the server

  2. Press Enter key at boot loader to get to the boot menu

  3. Press Space to pause the default boot loading

  4. Boot into single user mode (press 4)

  5. Define Shell : enter the full pathname for the shell (or press enter for default path /bin/sh)

  6. remount root file system (/) rw (read/write)

    mount -u /

    mount -a

  7. Create a new Password with

    passwd

  8. boot multi user OR reboot

    8a multi-user

    exit

    8b. reboot

    sync

    reboot

Source:

cyberciti.biz

share|improve this answer
1  
Note: This only works if the console is marked "secure" in /etc/ttys. By default is it marked secure. –  Chris S May 20 at 15:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.