[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ltib] Tip: How to configure sudo properly
From: |
Svein Seldal |
Subject: |
[Ltib] Tip: How to configure sudo properly |
Date: |
Fri, 03 Jul 2009 21:08:30 +0200 |
User-agent: |
Thunderbird 2.0.0.22 (X11/20090608) |
Hi guys
I'd like to share a small experience with sudo -- it not directly linked
to LTIB, but it's for all you guys out there struggeling with similar
symptoms. For the record I'm running Ubuntu Jaunty (9.04).
I had a problem with sudo where it kept asking me for password, even
despite it was properly configured.
You can list the valid sudo commands with:
$ sudo -l
User foobar may run the following commands on this host:
(root) NOPASSWD: /usr/bin/rpm
(root) NOPASSWD: /opt/freescale/ltib/usr/bin/rpm
(ALL) ALL
Here's the catch 22: The "(ALL) ALL" line MUST be located above our
NOPASSWD lines. I below, the ALL specifier will override the NOPASSWD
commands and thus re-request a password. Hence the output must look
something like this:
$ sudo -l
User foobar may run the following commands on this host:
(ALL) ALL
(root) NOPASSWD: /usr/bin/rpm
(root) NOPASSWD: /opt/freescale/ltib/usr/bin/rpm
Just make sure the NOPASSWD lines are at the bottom of the sudoers file.
It will save you time and annoance!
Best regards,
Svein
- [Ltib] Tip: How to configure sudo properly,
Svein Seldal <=