Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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'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
You can set up sudo to use a password database different from the system default. This answer from unix stackexchange tells how: – Mark Plotnick Aug 4 '14 at 14:42
Thank you ,that's what I was looking for – dapias Aug 6 '14 at 16:11

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 '14 at 14:40
If this is solved granting the user ability to run apt-get, how can I do that? – dapias Aug 4 '14 at 14:41
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 '14 at 12:58

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.