OPNsense Forum

Archive => 23.1 Legacy Series => Topic started by: tre4bax on July 21, 2023, 11:05:49 AM

Title: Import existing config but have the root password reset to default
Post by: tre4bax on July 21, 2023, 11:05:49 AM
I am trying to reload a new copy of opnsense and base it on a config.xml.

I can do this and it gets running as my server, however the challenge is I chose a really complex password for my system and it is too hard to type it in manually.   This means I cannot get logged in to run the installer to get it on the hardware.

Is there a way to get the system to do the import but replace the config.xml version of the root password with the standard opnsense default?    If not an option can I do this by modifying config.xml?
Title: Re: Import existing config but have the root password reset to default
Post by: tre4bax on July 21, 2023, 11:13:38 AM
Easy fix.

I went into config.xml and removed the password for root.  Then the importer worked and it defaulted to the normal root password.
Title: Re: Import existing config but have the root password reset to default
Post by: netshi on October 07, 2023, 08:31:37 PM
Hi Trebax,

What exactly did you do to fix the login. I am in the same situation. I rebuilt my OPNsense and when I restored the backup config.xml, the credential was not working anymore. I even tried to reset the root account via the "opnsense-shell password" command but it didn't do anything. I could not login to the web UI, SSH or the console.

I opened the .xml file and deleted the  <password>hashed-password</password> line, and restored the config using this modified .xml, but I still could not login.

Any ideas?