Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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'm bit confused because I can't perform such an easy thing as permitting root login to the server (I'm using redhat). I changed PermitRootLogin from no to yes on the server's /etc/ssh/sshd_config and then restarted sshd service but that didn't give me what I want. Do anybody knows any other ways of how root login via ssh can be permitted?

Thanks in advance!

Error message is:

May 30 21:25:20 mngmsg39 pam_root_login[29703]: pam_root_login user name:root
May 30 21:25:20 mngmsg39 pam_root_login[29703]: Customer-Root retval:0, value:disabled
May 30 21:25:20 mngmsg39 pam_root_login[29703]: pam_root_login: Root access NOT allowed
May 30 21:25:20 mngmsg39 pam_asg[29703]: Login for [root] - rhost[],tty[ssh]
May 30 21:25:20 mngmsg39 pam_asg[29703]: Login root not an ASG login
May 30 21:25:20 mngmsg39 sshd[29703]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=  user=root
share|improve this question
What error did it give you? I won't even go into the reasons why its a bad idea, but what error did it give you? – NickW Jun 4 '13 at 14:10
@NickW, could you please tell where can I look at the error? The thing is that I can log in as root via su, but unable via ssh. – mr.nothing Jun 4 '13 at 14:27
Well, you should have errors for ssh in /var/log/secure but otherwise, they may be in /var/log/messages – NickW Jun 4 '13 at 14:30
Where did your set PermitRootLogin? Please include all details, which files did you edit? It is MUCH MUCH better to login as a normal user and then switch to root if you have to. – terdon Jun 4 '13 at 14:32
@NickW, I look into the logs and it seems that PAM restricts me from logging in as root. Are there any guidelines of how it can be overcome? – mr.nothing Jun 4 '13 at 14:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.