Find the answer to your Linux question:
Results 1 to 4 of 4
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2005
    Posts
    40

    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.
    root:0:0::/root:sh

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

  2. #2
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,733
    Not sure it would help, but have you tried resetting your root password?

    http://www.linuxforums.org/forum/lin...-password.html
    oz

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

    My root entry in /etc/passwd is

    Code:
    root:x:0:0::/root:/bin/bash
    so, it looks like it gives the full path of the shell.

  4. #4
    Linux Newbie
    Join Date
    May 2006
    Location
    Kansas
    Posts
    187
    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.

    --kah00na

Posting Permissions

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