change default root password

Started by michaelgo, October 06, 2021, 08:39:36 AM

Previous topic - Next topic
Where can i change default root password?
so even after reset it would default to different password than 'opnsense'?
thanks

Are you running a live version of OPNsense perhaps?

From the docs: https://docs.opnsense.org/manual/install.html

   To invoke the installer login with user installer and password opnsense

After installing the software on a local drive you will be asked to set/change your root password.

Bart...

thank you,
what i mean is actually after installation.
Change the default password the shell script 3) resets to...

In the UI: System > Access > Users.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

is there a way to change from CLI?


Login via SSH, and if you are using an interactive shell for your user, invoke `opnsense-shell` first. That gives you the familiar console menu.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Actually, /usr/local/etc/config.xml holds the default configuration in case of factory reset, but that is option (4). Simply replacing this configuration file with any other config.xml makes that the factory reset default with users, passwords and other configurations set accordingly.

Option (3) does not set "opnsense" as the password as you can input your own.

Cheers,
Franco

@franco
thank you so much, this is the answer i've been looking for

is it bcrypt encoded in config.xml?

Ye but any sort of password hash in proper format will work. You can just add a new user with the desired password and look at /conf/config.xml to copy it from.


Cheers,
Franco