I love fish. I have a nice Ubuntu 8.04 Server running some services. So I edited the /etc/passwd file, as I did in the past, to change my default shell from bash to fish. And ,yes, I made I typo (BTW: I know about chsh, I'm just that stupid and overconfident). Please, stop laughing.
As expected, now I can't login. Is it possible log in without restarting the server?. I know that I can restart the server in safe mode and solve the mess, but I'd like to avoid it.
Oh yeah, I have no other user with sudo rights in that server. Stop laughing again.
BTW, I made the mess using ssh, but I have easy physical access to the server, it's just a couple of rooms away.
Best Answer
Unfortunately, no; you've locked yourself out. SSH won't let you log in if the shell is missing. Here's what the attempt looks like in
/var/log/auth.log
:And on-console TTY login will always attempt to launch your configured shell. Without another user with
sudo
rights, you'll need to boot to single user mode to fix it. :(