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.

I've created as administrator other account using the command sudo adduser newuser. The system asked for a UNIX password and I provided it, but now I want to create a sudo password for that account. I mean, I want that the user can install packages but only if he/she knows a password different to the UNIX password.

Is this possible?

share|improve this question
1  
You can set up sudo to use a password database different from the system default. This answer from unix stackexchange tells how: unix.stackexchange.com/a/94646/49439 –  Mark Plotnick Aug 4 at 14:42
    
Thank you ,that's what I was looking for –  dapias Aug 6 at 16:11

1 Answer 1

sudo just enables one to run privileged commands from a normal user account. It does this by verifying that the user is who they say they are (by asking for their password) and referencing the sudo configuration in /etc/sudoers to validate that they can indeed run the command they are requesting.

In your case, you need to grant the user the ability to run apt-get.

share|improve this answer
    
I don't understand completely what you mean. If I type sudo apt-get foo it asks for a password, if I type the UNIX password it says: username is not in the sudoers file, I want to add username to the sudoers file but with the requirement of a different password –  dapias Aug 4 at 14:40
    
If this is solved granting the user ability to run apt-get, how can I do that? –  dapias Aug 4 at 14:41
1  
See 'man 5 sudoers' for more info about how to grant users sudo capability. Also, see Mark Plotnick's comment about how to have it look into a different password database. I still learn something new every day! –  Mike K Aug 5 at 12:58

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.