Wrong root shell in /etc/passwd
By accident, I changed shell of root account to /bin/sbin/nologin (should be /usr/sbin/nologin) in /etc/passwd. Now, I cannot even sudo from an admin account which was able to issue 'sudo' before. The error message is "johndoe not in the sudoers file."
I need a way to change /etc/passwd. Anyone can help?
1 Reply
@joelckchen --
The response by @bthompson at the end of this thread:
discusses how to boot your Linode to rescue mode; mount your Linode's /dev/sda to the rescue mode system; and edit /etc/passwd to fix your mistake.
I'm pretty sure sshd(8) is not enabled in rescue mode (it's been awhile for me) so you will have to use lish/glish as your terminal.
-- sw