ssh root access denied after changing shell
- Always use
vipw
to edit /etc/passwd, andvipw -s
to edit /etc/shadow. - Check that the shells you're trying to use are listed in /etc/shells.
- Check that SElinux is not set to 'enforcing' in /etc/selinux/config. Change it to 'permissive' or 'disabled'. [requires reboot]
- When you want to try a new shell don't log out to test it. Start up an additional SSH session or tty, and leave the current one running in case you f*ck it up.
- Check your logs for errors relevant to the login process that might indicate what else is wrong.
If you still can't fix it on your own, then contact your hosting provider. They will either know how to fix it inside of 10 minutes, or you should find a better host.