OPNsense Forum

Archive => 18.1 Legacy Series => Topic started by: bstech-user on July 17, 2018, 12:31:32 am

Title: [SOLVED] 2 Factor authentication
Post by: bstech-user on July 17, 2018, 12:31:32 am
I tried to setup google authentication so that I can use the 2 Factor Auth on my opnsense setup and change to no-fallback. Now I can't login to the router and am not getting the 2FA option to enter a pin code. Is there a way to disable this from the console? Thanks
Title: Re: 2 Factor authentication
Post by: bartjsmit on July 17, 2018, 08:25:55 am
From the console use option 13 to return the firewall to a state before you locked yourself out.

Bart...
Title: Re: 2 Factor authentication
Post by: bstech-user on July 17, 2018, 01:02:57 pm
Thanks bart... for your response but it seems I am locked out of the console as well. Is there a way to restore that?


Sent from my iPhone using Tapatalk
Title: Re: 2 Factor authentication
Post by: marjohn56 on July 17, 2018, 02:53:28 pm
You might try logging in as a single user and recovering an older config before you changed the passwords etc. So login as a single user:


Allow write operation.


# /sbin/mount -u /


Change to the config dir


# cd /conf


rename the existing config.xml


#mv config.xml config.old


change to the backup directory.


# cd backup


find an older config


# ls -ltcr

copy the file name so you can paste it in the next bit.

make that file the current config.xml


# mv selected_backup.xml /conf/config.xml


reboot the system.





Title: Re: 2 Factor authentication
Post by: bstech-user on July 18, 2018, 12:37:54 am
Thank you both. The steps provided worked nicely.


Sent from my iPhone using Tapatalk
Title: Re: [SOLVED] 2 Factor authentication
Post by: Evil_Sense on July 28, 2018, 10:16:52 pm
Just a hint: the pin code has to be entered in the password field (either prepended or appended, depending on the choosen setting), there's no dedicated pin code field :).