Re: adduser - useradd?


Subject: Re: adduser - useradd?
From: Keary Suska (hierophant@pcisys.net)
Date: Tue Jan 22 2002 - 09:04:10 MST


on 1/21/02 11:53 PM, dwright5@nyc.rr.com purportedly said:

> - is it ok to put /sbin in $PATH, security risk?

No, as has been described. IIRC, there were historical reasons for sbin/
being omitted, mostly to protect the sysadmin from him/herself, but also as
a way to avoid accidentally invoking trojan horse programs, but this is
solved by not having "." in your path (for root at least).

> Charlie Watts wrote:
> ",... It often means that you have done "su" to become root.
> You want to "su -" to get -all- of root's enviroment,..."
>
>
> -for 'quick fix\'s' i always: su -c 'command',... i didn't realize there were
> 'different levels' of 'root' - thanks

It is not an issue of "levels", really. The "-" (also -l) option indicates
that the current environment is unset (except for a few), then the default
is loaded and the shell init scripts are run for that user as if they had
logged in in the first place. This is mostly useful when you need the target
user's environment, such as root and needing a better $PATH, or certain
aliases that you use often.

Keary Suska
Esoteritech, Inc.
"Leveraging Open Source for a better Internet"



This archive was generated by hypermail 2a24 : Tue Jan 22 2002 - 09:19:49 MST