Home » Questions » Computers [ Ask a new question ]

What chsh did when I type `chsh -s SHELL` and how to go back to previous SHELL?

What chsh did when I type `chsh -s SHELL` and how to go back to previous SHELL?

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

Asked by: Guest | Views: 337
Total answers/comments: 1
Guest [Entry]

"Login as root and use:

chpass username

You'll be in a vi buffer with the user settings. Change the shell to /bin/tcsh and Bob's your uncle.

As for why, these settings are actually held in /etc/master.passwd. /etc/passwd is generated from that file. Read The Fine Manual for more."