Re: root passwd lost

From: Alan Somers <asomers_at_freebsd.org>
Date: Mon, 13 Dec 2021 02:46:50 UTC
On Sun, Dec 12, 2021 at 7:33 PM Frank Hwa <frank@tomatoservers.com> wrote:
>
> Can you help me with the case I lost my root password for the dedicated
> server which has freebsd installed?
>
> Thanks in advance.

Easy, you just need console access.  First reboot it.  At the loader
prompt, select "Boot single user".  Then after the kernel loads you'll
find yourself automatically at a root prompt, without needing to
login.  Change your password using passwd, then exit the shell to
continue normal boot.  You may need to remount your / filesystem rw in
order to change the password.  That can be done with "mount -u -w /"

-Alan