4

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
1
  • ...the easiest thing to do would be to boot off a livecd. Or try single user mode.
    – Bob
    Commented Jun 24, 2014 at 9:21

2 Answers 2

6

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

root:x:0:0:root:/root:/bin/false

with

root:x:0:0:root:/root:/bin/bash
1
  • 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
    Commented Jun 24, 2014 at 9:32
0

Try:

sudo vigr

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .