Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 16
hi all i have a debian distribution i was actually trying out various commands in the terminal and i hit chsh and wanted to activate zshell which my distribution didin't ...
  1. #1
    Just Joined!
    Join Date
    Jul 2011
    Posts
    6

    unable to login as root

    hi all
    i have a debian distribution
    i was actually trying out various commands in the terminal
    and i hit chsh and wanted to activate zshell
    which my distribution didin't have
    and now after that my pc doesnot allow me to login as root

  2. #2
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    1,935
    Seems as you changed the shell to one you don't have, try changing it back. Check the site below or google Linux chsh, you'll get lots of sites:

    Step-by-step how to change login shell using Linux chsh command. | Linux Windows Install Setup Configuration Project

  3. #3
    Just Joined!
    Join Date
    Jul 2011
    Posts
    6
    sorry ,
    but i followed the steps , it didnt work it says that /bin/zshell not present
    and it still doesnt allow me to login as root
    some other way or ther is something i don know

  4. #4
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    2,941
    what does cat /etc/shells list?

  5. #5
    Just Joined!
    Join Date
    Jul 2011
    Posts
    6
    cat/etc/shells lists the following things

    /bin/csh
    /bin/sh
    /usr/bin/es
    /usr/bin/ksh
    /bin/ksh
    /usr/bin/rc
    /usr/bin/tcsh
    /bin/tcsh
    /usr/bin/esh
    /bin/dash
    /bin/bash
    /bin/rbash


    but where do i go from here

  6. #6
    Super Moderator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,144
    What happens if you install zshell? I think that should allow you to login as root at the least....then you go about fixing this mess.
    I do not respond to private messages asking for Linux help, Please keep it on the forums only.
    All new users please read this.** Forum FAQS. ** Adopt an unanswered post.

  7. #7
    Just Joined!
    Join Date
    Jul 2011
    Posts
    6
    Quote Originally Posted by MikeTbob View Post
    What happens if you install zshell? I think that should allow you to login as root at the least....then you go about fixing this mess.
    it says chsh: bin/zshell is an invalid shell

    and the error which it returns on loging as root is
    Cannot execute /bin/zsh: No such file or directory

    and the command echo$shell
    doesnot return me anything , instead returns me thebterminal prompt again

  8. #8
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    2,941
    Do you have another user able to modify /etc/passwd ... or able to write to /bin ?
    If you do then change /etc/passwd entry for root to /bin/bash ... or even symlink /bin/zsh to /bin/bash I think should allow root login.

  9. #9
    Linux Guru
    Join Date
    May 2011
    Posts
    1,813
    You could always reboot and at the grub prompt, append the following to the kernel args:

    Code:
    init=/bin/sh
    That will boot you into a kind of emergency mode where you'll be root (there is not even a password prompt - typically), and the bash shell will be your command line interpreter, regardless of what is in /etc/passwd. Then you can do whatever.

  10. #10
    Just Joined!
    Join Date
    Jul 2011
    Posts
    6
    Quote Originally Posted by atreyu View Post
    You could always reboot and at the grub prompt, append the following to the kernel args:

    Code:
    init=/bin/sh
    That will boot you into a kind of emergency mode where you'll be root (there is not even a password prompt - typically), and the bash shell will be your command line interpreter, regardless of what is in /etc/passwd. Then you can do whatever.


    nothin happens the emergency mode doesnt turn up
    further after rebooting the system the same error persists, and the error opens a window , as follows

    Failed to run /usr/bin/x-terminal-emulator as user root.

    Failed to communicate with gksu-run-helper.

    Received:

    While expecting:
    gksu: waiting

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •