Bugzilla – Bug 384
Long args lead to sudo authentication unnecessary.
Last modified: 2010-05-07 13:33:37 MDT
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.
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.