Never locked out again from my FreeBSD virtual machine for having forget the root password.
The fix:
- Boot in single user mode
- Remount the
/
file system in read and write mode withmount -u /
and thenmount -a
- Setup the new password by
passwd
- Boot in multi-user mode with
exit
- ???
- Profit!
Pheww.
I needed to save this tip somewhere because I know I will forget root password again.