Stuck as root user after each boot

Started by FreeBSD4Me, November 02, 2020, 12:42:51 AM

Previous topic - Next topic
November 02, 2020, 12:42:51 AM Last Edit: November 02, 2020, 01:36:49 AM by FreeBSD4Me
Hello, I'm. new to the forum. Here is my problem: I switched to root (sudo su -) from a shell over serial to create a custom loader.local.conf. I saved the file and then issued the reboot command without exiting from the menu option 0. The firewall now automatically boots into a shell with the root user already logged in without entering a password. I manually run "/usr/local/sbin/opnsense-shell" to start the menu as a workaround. How do I stop booting into a shell as root and get back to automatically booting the menu? Thank you.

November 02, 2020, 01:15:52 AM #1 Last Edit: November 02, 2020, 01:36:30 AM by FreeBSD4Me
I was reading the /usr/local/sbin/opnsense-shell script which gave me a clue about what caused this problem. The section reads "...assumes a full root shell and has no way to override it because the target user most likely does not have a shell set." The root user had a login shell of csh, so I set the login shell back to the opnsense-shell. I must have caused this problem accidentally. Problem solved.