LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 01-21-2009, 09:14 PM   #1
ashikaumanga
LQ Newbie
 
Registered: Jan 2009
Posts: 8

Rep: Reputation: 0
Exclamation changed shell using 'chsh'! Now cant login to root !! ?? Help


Greetings all,

I accidently,changed the shell to 'zsh' (which is not installed) using 'chsh'.This happened while I was logged in as root.

Now I can't login as root ,or execute any programs which need root privileges.

When I try to login it says:

"umanga@umanga:~/.biskit$ su
Password:
Cannot execute /usr/bin/zsh: No such file or directory
"


how to fix this?
PS: I use Debian
 
Old 01-22-2009, 07:44 AM   #2
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 668

Rep: Reputation: 134Reputation: 134
Quote:
Originally Posted by ashikaumanga View Post
Greetings all,

I accidently,changed the shell to 'zsh' (which is not installed) using 'chsh'.This happened while I was logged in as root.

Now I can't login as root ,or execute any programs which need root privileges.

When I try to login it says:

"umanga@umanga:~/.biskit$ su
Password:
Cannot execute /usr/bin/zsh: No such file or directory
"



how to fix this?
PS: I use Debian
Boot from LiveCD, mount your root partition and change your shell back
 
Old 01-22-2009, 10:07 AM   #3
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 163Reputation: 163
Quote:
Originally Posted by ashikaumanga View Post
how to fix this?
PS: I use Debian
Code:
su - -s /bin/bash
chsh -s /bin/bash
exit
If that doesn't fix it, you'll need to use the other method of a live cd, mounting the filesystem, and changing the passwd file entry manually.

Last edited by rweaver; 01-22-2009 at 10:09 AM.
 
Old 01-23-2009, 12:07 AM   #4
ashikaumanga
LQ Newbie
 
Registered: Jan 2009
Posts: 8

Original Poster
Rep: Reputation: 0
Cool

Quote:
Originally Posted by rweaver View Post
Code:
su - -s /bin/bash
chsh -s /bin/bash
exit
If that doesn't fix it, you'll need to use the other method of a live cd, mounting the filesystem, and changing the passwd file entry manually.

Yes,I fixed it using a LiveCD... the first method didn't work.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
wrong login shell prevent root login cefs99 Linux - Security 4 05-31-2006 09:28 AM
Root login name changed kinetik Linux - General 3 01-09-2006 08:14 AM
Big problem changed root password for mysql can't login pls comment johnnydangerous Linux - Software 5 07-08-2005 02:22 AM
Stupid mistake - changed root shell to /bin/false Kholnuu Linux - General 8 01-04-2005 04:48 AM
changed the login shell in /etc/passwd to the wrong path infamous41md Solaris / OpenSolaris 3 07-03-2004 08:32 PM


All times are GMT -5. The time now is 11:40 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration