Bug 384 - Long args lead to sudo authentication unnecessary.
Long args lead to sudo authentication unnecessary.
Status: RESOLVED INVALID
Product: Sudo
Classification: Unclassified
Component: Sudo
1.6.9
PC Linux
: low security
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-12-12 21:32 MST by eli.w
Modified: 2010-05-07 13:33 MDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description eli.w 2009-12-12 21:32:53 MST
OS     : Ubuntu 9.04
Kernel : 2.6.28-15-generic

---------------------------------------------------
$ sudo -V
Sudo version 1.6.9p17

$ ll /etc/drcom.conf
-rw------- 1 root root 718 2009-12-12 12:00 /etc/drcom.conf

$ sudo cat /etc/drcom.conf | head -n 9 | tail -n 2
device=wlan0
mac=00:1C:BF:84:E9:82

---------------------------------------------------

I wana get the device config info.
So I edit a script include:


---------------------------------------------------

conf=/etc/drcom.conf
device=`sudo cat $conf |grep device | awk -F '=' '$1=="device" {print $2}'`

---------------------------------------------------

But it turn out to be authentication unnecessary when exec the script and what's more, it appers authentication unnecessary no matter I use sudo in a new session or even re-login after the above.
Comment 1 Todd C. Miller 2010-05-07 13:33:37 MDT
I think you are getting confused by sudo's time-based authentication caching.  By default, if you authenticate with sudo you will not have to enter a password if you run sudo again within 5 minutes.  Depending on the sudoers settings, this may or may not apply to all login sessions.