sudo Trouble: Always asking for password despite NOPASSWD

Yes, I’m too lazy: I love NOPASSWD in my sudoers. Yes, this is bad security practice. Anyway, after installing Hardy I couldn’t make it work.

Finally I found that sudo takes the last appropriate entry that matches, not the first, as other tools do.

So after moving my custom sudoers rule to the end of /etc/sudoers, I now can continue my bad habits …

Advertisements

3 Responses to “sudo Trouble: Always asking for password despite NOPASSWD”

  1. Nathan Says:

    Thanks man, this is exactly what I was looking for

  2. sandy Says:

    thanks for giving such information it will be really helpful.

  3. linos Says:

    Moving to Karmic, I saw that there is now a very convenient way to achieve my bad habits configuration:

    /etc/sudoers now includes files in /etc/sudoers.d. This is intended to be used by packages. My usage is like this:

    user@host:~$ sudo cat /etc/sudoers.d/user
    user ALL=(ALL) NOPASSWD: ALL

    AFAIK the file must be owned by root and must be 440 !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: