Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Dec 2021 19:46:50 -0700
From:      Alan Somers <asomers@freebsd.org>
To:        Frank Hwa <frank@tomatoservers.com>
Cc:        FreeBSD CURRENT <freebsd-current@freebsd.org>
Subject:   Re: root passwd lost
Message-ID:  <CAOtMX2hyAwBRehCPOm-KPL-34uA_xt18FnJOB-fmfVe2n%2BPG9Q@mail.gmail.com>
In-Reply-To: <5f2d681b-e74b-a7bb-eca0-3f2c40533c69@tomatoservers.com>
References:  <CA%2BGLnbgVGghYAYPbQfu0H0cGvXxk-v0jAZTxLLz%2BhRn5eXjP0g@mail.gmail.com> <f8e569a4-3510-5a91-62b2-f9080b197ebc@beepc.ch> <CAJQ5JnhpioiO_j-iidk8QbfONU6a2Jm%2BunGCdAuN=Es8UZUQzw@mail.gmail.com> <47ca4ab6-52cf-8dbe-a1f0-7db13a8f605d@quip.cz> <CAJQ5Jnj8Nq_LN1Wd3kkgnRd-7zykb3AC5b7KEmO-8Woiw0gsYw@mail.gmail.com> <e8e960c7-7dfe-80b7-73e0-80a020628cb4@codenetworks.net> <5f2d681b-e74b-a7bb-eca0-3f2c40533c69@tomatoservers.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2hyAwBRehCPOm-KPL-34uA_xt18FnJOB-fmfVe2n%2BPG9Q>