Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This might be a very naive question, but I wanted to know how I could give multiple users access to a single computer without making them root users. How would I give them limitted sudo access such that they could still issue commands like

sudo apt-get install epstopdf

I imagine this could be an incredibly stupid question as once root user access is given, they could do whatever they want. Therefore, is there any way around this? I am open to suggestions

share|improve this question
add comment

2 Answers

up vote 9 down vote accepted

Open a terminal and type sudo visudo. At the end of the file (really the last line in it) type %yourusername% ALL=NOPASSWD: /usr/bin/apt-get install where %yourusername% is replaced by your username.

After that you wont be prompted for a password to use sudo apt-get install anymore but please understand this is a very risky solution, there is a reason why you need to type a password for some commands, the use of these commands without password can leave your system open for some dangers. Use with caution.

share|improve this answer
    
Could sudo apt-get install lead to problems by, for example, installing a program which does rm -f -r / ? –  puk Oct 31 '11 at 20:43
2  
Well, no not really. And if it does you need to type sudo rm -rf / and the instructions I gave are only to enable sudo apt-get install, even if you enable a PPA that has that kind of code, even if you install it without really knowing what you are doing and the program tries to run he wont have access... You did not give yourself sudo rm permition, only sudo apt-get install. Its the safest approach to a insecure situation ;) –  Bruno Pereira Oct 31 '11 at 20:50
    
perfect, thank you –  puk Oct 31 '11 at 21:05
    
fixed the path to the file was wrong :D the path was not /usr/sbin but /usr/bin ;) it just works –  Bruno Pereira Oct 31 '11 at 21:15
add comment

Sudo is exactly made for that. By editing the sudoers file you can give users specific privilegues:

see this reference for details

share|improve this answer
add comment

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.