Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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