Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I tried to change my user's shell, but used "sudo chsh", and changed the root shell to "bash" instead of "/bin/bash". Now when I try to change it I get "chsh: PAM authentication failed" and it seems like other things aren't working, either.

~$ sudo su
Cannot execute bash: No such file or directory

This happens with recovery mode, too. What do I do to change it to something usable?

share|improve this question
up vote 10 down vote accepted

If you are able to login using your regular user, just change the root users shell directly:

sudo gedit /etc/passwd

Find the line for you root user, usually the first one, and change the last part from

...:bash

to

...:/bin/bash

And you should be good to go.

(NB: Replace gedit with whatever editor you fancy.)

share|improve this answer
1  
That worked. Thanks! – endolith Nov 21 '09 at 17:02

Use the Ubuntu install disk to boot the live session.

Mount the root ('/') partition on the harddisk (make sure it's writable).

edit '[HD mount point]/etc/passwd' (eg /media/sda1/etc/passwd),

root should be the first line, just correct the login shell which will be the last entry on the line.

Unmount harddisk. Remove CD. Reboot

share|improve this answer
2  
This is "if you can't log in as your regular user" – Broam May 25 '10 at 13:38

You must log in to answer this question.

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