[sudo-users] sudo can't find an executable in my $PATH!
Marylou.Kohlmeier at canyons.edu
Mon Nov 3 16:52:36 EST 2008
Does anybody have a "sudoers file" sample that I can look at? I'm trying to set-up our sudoers and would like to have a sample, if possible. Any help provided will be appreciated.
*Email: marylou.kohlmeier at canyons.edu
"I cannot teach anybody anything, I can only make them think " Socrates
From: sudo-users-bounces at courtesan.com [mailto:sudo-users-bounces at courtesan.com] On Behalf Of Todd C. Miller
Sent: Sunday, November 02, 2008 10:00 AM
To: Kārlis Repsons
Cc: sudo-users at sudo.ws
Subject: Re: [sudo-users] sudo can't find an executable in my $PATH!
In message <200811011843.16809.repsons at gmail.com>
so spake =?utf-8?q?K=C4=81rlis_Repsons?= (repsons):
> I was doing more "research" on the problem and it is in the fact,
> that $PATH variable gets modified by sudo! I set sudoers to preserve
> PATH, but no good.
> env and "sudo env" gives me different things! Why is that?
Sudo will remove some potentially dangerous variables from the
environment, as described in the manual. However, it does not
modify PATH unless configured to do so at compile time via the
--with-ignore-dot and/or --with-secure-path configure options.
It is possible that your vendor has enabled the secure path option,
in which case sudo will only look for commands in a hard-coded path.
You can run "sudo sudo -V | grep PATH" and see if there is a line
in the output similar to:
Value to override user's $PATH with: /usr/bin:/usr/sbin
If so, the mystery is solved. Unfortunately, there is no way
to override this value at runtime, though you can certainly
rebuild sudo without secure path enabled.
sudo-users mailing list <sudo-users at sudo.ws>
For list information, options, or to unsubscribe, visit:
More information about the sudo-users