Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
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

2 Answers 2

up vote 3 down vote accepted

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

share|improve this answer

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

passwd root
share|improve this answer

Your Answer

 
discard

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

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