Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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 sytem, i run command apt-get install csh on the system and try to change the shell by command chsh -s but now the prob is when i try to login the system by ssh i am not able to login by any user account except one and try to change the user su - root it is showing cannot execute c: no such file or directory and look in the /etc/passwd file for root account in shell field C is written in place of /bin/sh help me out to restore the settings

share|improve this question

Boot live media.

Make sure your local HD is mounted by browsing for it in nautilus.

Open a terminal: CTL + ALT + T

Get root and change it to whatever shell you want:

sudo su
cd /media/partitionname/etc/
nano passwd

navigate to the root line which you say looks like this:


make it look like this to restore default:


Press CTL+X then Y then Enter
It should save. Now type:

cd /

Unmount the drive with the eject button in the nautilus window and reboot.

Easy peasy.

Now that it's correct you're able to log in as long as you don't run chsh -s c again. If you want to change a user's shell you specify the full path to the shell as expressed in /etc/shells like chsh -s /bin/csh NOT this chsh -s c

share|improve this answer
thankx aking1012, can u tell me please why the passwd file changes when i run the command chsh -s c. i m new to ubuntu. thanks again.. – pankaj sharma Mar 18 '12 at 5:27
I think you made a typo. chsh is change shell. csh is a shell. – RobotHumans Mar 18 '12 at 5:32
thanks @aking1012 – pankaj sharma Mar 18 '12 at 5:48
why i m not able to login by any user root etc.. – pankaj sharma Mar 18 '12 at 11:44
>>there is only one user account by which i can login.when trying to switch user #su - root it ask for password when i write password it is showing cannot extcute c: no such file or directory. – pankaj sharma Mar 19 '12 at 11:07

Your Answer


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.