http://brandonhutchinson.com/mediawiki/index.php5?title=Sudo_notes&action=history&feed=atomSudo notes - Revision history2015-03-03T22:38:56ZRevision history for this page on the wikiMediaWiki 1.11.0rc1http://brandonhutchinson.com/mediawiki/index.php5?title=Sudo_notes&diff=1234&oldid=prevHutch: New page: == sudo ignores current directory in PATH by default == * By default, the current directory in a user's PATH is ignored. ignore_dot If set, sudo will ignore ’.’ or ’’ (cu...2008-06-13T15:12:07Z<p>New page: == sudo ignores current directory in PATH by default == * By default, the current directory in a user's PATH is ignored. ignore_dot If set, sudo will ignore ’.’ or ’’ (cu...</p>
<p><b>New page</b></p><div>== sudo ignores current directory in PATH by default ==<br />
<br />
* By default, the current directory in a user's PATH is ignored.<br />
ignore_dot If set, sudo will ignore ’.’ or ’’ (current dir) in the<br />
PATH environment variable; the PATH itself is not modified.<br />
This flag is on by default. Currently, while it is possi-<br />
ble to set ignore_dot in sudoers, its value is not used.<br />
This option should be considered read-only (it will be<br />
fixed in a future version of sudo).<br />
<br />
Example:<br />
$ '''sudo -l'''<br />
User hutchib may run the following commands on this host:<br />
(ALL) NOPASSWD: /files1/AdventNet/ME/*/bin/*<br />
(ALL) NOPASSWD: /etc/rc.d/init.d/netflowanalyzer<br />
(ALL) NOPASSWD: /sbin/service netflowanalyzer *<br />
$ '''cd /files1/AdventNet/ME/NetFlow/bin'''<br />
$ '''sudo ./linkAsService.sh'''<br />
(Prompts for password)<br />
$ '''sudo linkAsService.sh'''<br />
As a workaround, make sure the appropriate directories are in your PATH and execute the command without the '''./'''<br />
$ '''PATH=$PATH:$(pwd) sudo linkAsService.sh'''<br />
(Works without prompting for password)</div>Hutch