I'm on a RHEL server where the su command drops the user into root without prompting for a password. Obviously, this is a pretty big cause for concern which I'd like to fix. I'm not in contact with the previous admin, and he didn't leave any notes on what he did to make this happen.

The user account in question is a member of the sudoers group, and I noticed that the config contains the line Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin, but I'm not sure if this is related.

How should I troubleshoot this issue?

  • 3
    check for NOPASSWD in sudoers file. – Laurentiu Roescu May 21 '13 at 17:46
  • That was the first thing i checked; the only reference to it was a comment. – devnill May 21 '13 at 17:54
  • 3
    @LaurentiuRoescu this is su not sudo. Anyway, check the /etc/pam.d/su file. – Michael Hampton May 21 '13 at 17:55

Check if user root has password set. Try login as a root without pass or check /etc/shadow file.


The most likely cause is the root user having no password. Give root a password

passwd root

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.