Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

in a linux system with

su - 

any user (with root password) can get root privileges. how I can restrict to some users ?

// similar to AllowUsers in sshd_config

share|improve this question
3  
The best way to control it is not giving every user the root password. When you give them the root password, you have given up control over what they do. Anything that you do to stop them, they can undo. –  EBGreen Apr 4 '12 at 15:12
1  
Yup, don't give them root password. If you want them to get restricted administrative privileges, use sudo with explicitly allowed binaries. This is still tricky, but at least you have some possibility to actually log what they are using their root privileges for (with maaany caveats if one is not careful). The solution to your specific question is: change the root password and only tell the ones who should have root access the new password. –  Daniel Andersson Apr 4 '12 at 15:18
    

1 Answer 1

up vote 7 down vote accepted

You should not give the root password to users who do not need full root access.

Keep the root password secret and use sudo to give restricted users access to just what they need (see man sudoers for some examples)

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.