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?

Good Person
  • 359
  • 6
  • 18

1 Answers1

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

Dennis Nolte
  • 2,881
  • 4
  • 27
  • 37
  • 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