# I forgot the password to FreeBSD 9.x



## YolsuzTR (Oct 24, 2013)

I forgot the password to FreeBSD.  How do I fix that?


----------



## zspider (Oct 24, 2013)

Reboot into single user mode, 5 on the loader menu.

It will drop you into a root shell. Then remount root as read write `mount -ruw /`, then remount all filesystems `mount -a` and type `passwd`, it will then prompt you for a new one.

This is probably available in the handbook though, so in the future you should look there first.


----------



## trh411 (Oct 24, 2013)

I'm assuming here you mean the root password.

Boot into single user mode.
When you see the prompt "When prompted Enter full pathname of shell or RETURN for /bin/sh:", press RETURN
Enter the following commands:


```
# mount -u / 
# mount -a
# passwd
(enter the new root password here when prompted)
# exit
```

Your system will reboot into multi-user mode after the `exit` command.


----------



## YolsuzTR (Oct 24, 2013)

zspider said:
			
		

> Reboot into single user mode, 5 on the loader menu.
> 
> It will drop you into a root shell. Then remount root as read write `mount -ruw /`, then remount all filesystems `mount -a` and type `passwd`, it will then prompt you for a new one.
> 
> This is probably available in the handbook though, so in the future you should look there first.



I could not. :S


----------



## YolsuzTR (Oct 24, 2013)

It was ok 


```
fsck -y
mount -ruw /
mount -a
passwd root
```


----------



## zspider (Oct 24, 2013)

YolsuzTR said:
			
		

> Was ok
> 
> 
> ```
> ...



The addition of root in the `passwd` command is redundant. It assumes the username is the one of the account presently logged in, unless otherwise specified.


----------

