Jim Crumley wrote:

>On Tue, Jul 22, 2003 at 10:47:28AM -0500, Jima wrote:
>  
>
>> This is a good point to bring up.  With the default configuration of 
>>RedHat (and probably most distros), if you log in as root or use `su -`, 
>>it'll load root's environment, including putting /sbin & /usr/sbin in the 
>>$PATH.  If you use `sudo` or just `su`, though, it won't load the 
>>environment, and programs in /sbin and /usr/sbin won't run without the 
>>full path (i.e., /usr/sbin/program).  This was news to a few people at the 
>>installfest, and to this day catches me on occasion.
>>    
>>
>
>Well, this is not true for Debian at least. With Debian, sudo and
>su seem to load the root's path settings.
>
>14(plasma) jcrumley% which fdisk
>fdisk: Command not found.
>15(plasma) jcrumley% sudo fdisk
>
>Usage: fdisk [-l] [-b SSZ] [-u] device
>E.g.: fdisk /dev/hda  (for the first IDE disk)
>  or: fdisk /dev/sdc  (for the third SCSI disk)
>  or: fdisk /dev/eda  (for the first PS/2 ESDI drive)
>  or: fdisk /dev/rd/c0d0  or: fdisk /dev/ida/c0d0  (for RAID devices)
>  ...
>16(plasma) jcrumley% sudo which fdisk
>/sbin/fdisk
>
>
>  
>
Of all the distros I've tried (and that's quite a few), Redhat is the 
only that exhibits this behavior.  I always just considered it an extra 
little (annoying)security "feature".  All this does is keep your average 
user from accidentally screwing something up by sudo-ing a command they 
have no clue how to use.  I still just found it annoying.

----
The Wandering Dru <dru at druswanderings.net>
http://druswanderings.net


_______________________________________________
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
http://www.mn-linux.org tclug-list at mn-linux.org
https://mailman.real-time.com/mailman/listinfo/tclug-list