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 have ubuntu 10.04 on my system. I run

apt-get install csh

and try to change the shell by

chsh -s

When I try to log into the system with ssh, I can't login with any account except for one, and when I try to change the user:

su - root

it is showing:

Cannot execute c: no such file or directory

I looked in the /etc/passwd file for a root account the "shell" field there is C written instead of /bin/sh

How do I restore the settings?

share|improve this question

migrated from stackoverflow.com Mar 18 '12 at 8:43

This question came from our site for professional and enthusiast programmers.

    
Root logins are disallowed on Ubuntu by default. Use sudo from your "main" account to run privileged commands. – Noufal Ibrahim Mar 18 '12 at 5:02

Try sudo -i /bin/sh to get a working root shell, then change the C in root's /etc/passwd to /bin/csh with e.g. vim or nano.

Add: If you're not in sudoers, you can also use su -s /bin/sh.

share|improve this answer

You must log in to answer this question.

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