I made a mistake of change the root shell to /bin/false, but when I want to change it back, I always got error

sudo chsh -s /bin/bash root
[sudo] password: <input current user password>
password: <input root password>
chsh: PAM: Authentication failure
  • ...the easiest thing to do would be to boot off a livecd. Or try single user mode. – Bob Jun 24 '14 at 9:21

You can modify the file /etc/passwd if chsh doesn't work, by replacing the line



| improve this answer | |
  • for editing /etc/passwd (which should indeed work) one must be root (or use sudo...). A livecd may work if the /-filesystem can be mounted. – trurl Jun 24 '14 at 9:32


sudo vigr

In the editor, change root's shell back to /bin/bash (It should be the last field on the first line)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.