3

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?

4

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

  • 2
    Note: This only works if the console is marked "secure" in /etc/ttys. By default is it marked secure. – Chris S May 20 '14 at 15:28

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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