Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 have this tool which allows users to manage printers in the linux environment. I need to allow a user to run this tool without giving him the root password. The permissions on the tool are:

-rwxrwxrwx 1 root root       78 Dec  4  2008 system-config-printer
share|improve this question
The permissions on the tool are wrong. Group others should absolutely not have write permission to a tool like this in any case, and most especially if the tool has a setuid permission set; that is an instant root-level hole. – Law29 Mar 5 at 11:28

The sudo command is very configurable, and can be used to grant specific users permission to run specific commands. Use visudo to edit /etc/sudoers, and enter a line like the following:

bob ALL = (root) NOPASSWD: /usr/sbin/system-config-printer

The user bob would then run sudo /usr/sbin/system-config-printer in order to run the tool.

share|improve this answer
up vote 0 down vote accepted

That is a great way to achieve that goal and i will use it myself next time. I used another method though: i've edited /etc/group and added the user in the end of the sys line: sys:x:3:root,bin,adm,itaig

anyways, thanks for your solution. Itai

share|improve this answer

You could set the owner and group of the executable as root, and then do chmod u+s and chmod g+s on it

Edit: Wikipedia

share|improve this answer

Your Answer


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.