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 edited /etc/sudoers using visudo command so as to grant user sudo privilege without password as following :


but it didn't work for me ,

any suggestions Thanks in advance

share|improve this question

migrated from Dec 18 '11 at 23:46

This question came from our site for professional and enthusiast programmers.

closed as off topic by Sven, Shane Madden, Bart De Vos, Ward, MDMarra Dec 19 '11 at 20:05

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

Did you use visudo to edit the file. Are you sure your config is valid? – Zoredache Dec 19 '11 at 2:37
What does the output of sudo -l look like while logged in as userName? – Kyle Smith Dec 19 '11 at 3:49
@Zoredache i used visudo , what do you mean with valid config ? – Eslam Dec 20 '11 at 0:41
@KyleSmith :Matching Defaults entries for emamdouh on this host: env_reset User emamdouh may run the following commands on this host: (ALL : ALL) NOPASSWD: ALL (ALL) ALL – Eslam Dec 20 '11 at 0:43
up vote 8 down vote accepted

Make sure that no rule below your mentioned rule are overriding it. From man sudoers (1.7.2p2):

   When multiple entries match for a user, they are applied in order.
   Where there are multiple matches, the last match is used (which is not
   necessarily the most specific match).
share|improve this answer
you are right as output of sudo -l shows that there are two rules applied to that user – Eslam Dec 20 '11 at 0:45


share|improve this answer
Please expand on your answer (why should they try this? what does it do?) -- See – voretaq7 Dec 19 '11 at 3:25
nope, this wasn't the problem, the problem was that there was two rules applied to that user – Eslam Dec 20 '11 at 0:46

Not the answer you're looking for? Browse other questions tagged or ask your own question.