I have mistakenly setting my user login shell to some unknown directory:([1].
Now, I can't login to this user.
Every time I try to ssh, it always failed as if I enter the wrong password.
I try to login using root and do su --shell=/bin/tcsh username
and I got
su: /path/to/shell/i/set/previously: permission denied
To be clear, /path/to/shell/i/set/previously
point to some directory, not to shell executable. I've tried to change my login shell on /etc/passwd
back to /bin/tcsh
with no luck:(. Always got the same permission denied error:(.
Now, I wonder what chsh did that make me unable to login even after I change the entry on /etc/passwd
. Also, how do I get back my previous shell (/bin/tcsh
)
Thank you.