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

I have installed su to allow a security analyst to login to a VPS to make some changes who needs root permissions - I have created a user and they can login fine under their acount but as soon as I type su, su - or su- root and then enter the users password I get:

su: incorrect password

Logging back in as root, the user has been added to sudoers and permissions on su are:

-rwsr-xr-x 1 root root 35K May 23 11:00 /bin/su

What else could be causing the problems? VPS is running Centos 6.4

share|improve this question

1 Answer 1

up vote 14 down vote accepted

su and sudo are different tools and work differently.

su always requires the root password to be entered in order to gain root privileges.

sudo requires the user's password to be entered (provided they are configured to be eligible for access) by default, but can be configured to require entering root's password as well.

You probably want to install sudo and use that instead of su.

share|improve this answer
    
Thank you, stupid error on my part! –  bhttoan Oct 5 '13 at 17:20
4  
It's not stupid. There's always the chance to confuse them, especially since they are similarly named and work similarly (just not equivalently). –  blubberdiblub Oct 5 '13 at 17:22

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.