OPNsense Forum

Archive => 23.7 Legacy Series => Topic started by: moals on February 14, 2024, 01:47:09 AM

Title: [solved] Need to restore config.xml ... root is disabled
Post by: moals on February 14, 2024, 01:47:09 AM
I've recently updated a couple of interface IPs and now I cannot get into the UI.  I have a console connection with an admin user, however root is disabled and my user is not in sudoers.  As such, I cannot copy a /conf/backup/config_file to /conf/config.xml.  I've tried editing the current config.xml file, however it is read only and I cannot chmod the file.  Also, I cannot run the opnsense-shell (to perform a scripted recovery?) (must be root user).

Most of the help from forums indicate doing one of the above items... given my limited experience here and that I cannot sudo or login as root, I feel like my hands are tied. 

Is there anything else that I can? I've thought of reinstalling OPNsense, then recovering one of the backups, however I came here for help first.
I appreciate whatever help that you can lend...thanks.
Title: Re: Need to restore config.xml ... root is disabled
Post by: zan on February 14, 2024, 04:40:02 AM
Do you have access to boot menu?
If you do then reboot to single mode (hit 2 on boot menu).
If asked for shell just hit enter (/bin/sh is default).
Then remount your root filesystem RW:
mount -u -o rw /
Title: Re: Need to restore config.xml ... root is disabled
Post by: moals on February 14, 2024, 05:15:08 AM
I appreciate your help.  I did have access to the boot menu, however due to time constraints, I went ahead and began a fresh install. I am going to keep your note close by for next time ...
Again, thank you very much for your help and quick reply.