Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Root cannot login

    Hello everyone.
    My root on my slackware cannot loggin.
    It gives me the access denied error.I am sure that password is correct.
    I can loggin as regular user though.Then when I try to SU it gives me this error:
    Cannot execute sh: No such file or directory.
    So I go to the passwd file and I see this entry under root.

    Is that right?
    What can I do to workaround the problem?
    Thank you.

  2. #2
    Join Date
    May 2004
    arch linux
    Not sure it would help, but have you tried resetting your root password?

  3. #3
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    the hills
    I don't know exactly, but it can't start a shell.

    My root entry in /etc/passwd is

    so, it looks like it gives the full path of the shell.

  4. $spacer_open
  5. #4
    Linux Newbie
    Join Date
    May 2006
    The problem is your root shell points to "sh" which isn't even a fully qualified name. It should be something like "/bin/bash". You can try and do a "su root" (no dash) and try to get to a root shell and then modify the file, or you will have to boot into a single user mode and modify the file and then reboot. If any other user can write to the /etc/passwd (which is doubtful) you could do that too.

    Also, if you can write to the "/" directory, try creating a soft link there like this "ln -s /bin/bash /sh". Then try to login as root again. I don't think this will work though unless you gave your own user ID special priviledges.


Posting Permissions

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