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

How do I allow an entire group, except a certain user in that group, to use sudo without providing password?

share|improve this question

It is enough to put the user line after th group line:

enzotib ALL=(ALL:ALL) ALL

If you want to have many users to be requested the password, without adding them to /etc/sudoers, you can create a group just for that, say we name it dummy, then write the following

%dummy ALL=(ALL:ALL) ALL

All users in the group admin and not in the group dummy can execute administrative tasks without entering the password.

All users in the group admin and in the group dummy (or only in the group dummy) can execute administrative tasks entering the password.

share|improve this answer
I need the configuration to work for new users, too, without adding them manually in visudo. – johnny Nov 12 '11 at 18:30
@traveller You asked how to enable all users in a group except one specific user to sudo to root without being prompted for a password. enzotib answered that question (assuming that you want that specific user to be able to sudo to root, just with a password). Do you want to edit your question? – Eliah Kagan Nov 12 '11 at 19:12
I'm sorry I misunderstood the solution given by enzotib. It works. Thank you very much !! – johnny Nov 12 '11 at 19:23
@traveller: see my updated answer. – enzotib Nov 12 '11 at 19:27
Please mark this answer as accepted if it has solved your problem. – Caesium Dec 7 '11 at 18:07

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.