Baskaran Sankaran wrote:

>Sorry if it is so silly.
>
>Is there any difference between logging in as root, or changing to su from a different
>user.
There is a slight difference:
su creates a shell with the priviliges of the named user (default is root). This shell 
will *not* be a login shell, which means that your paths do not change. If you do a su 
- (==su --login), then the new shell reads the named users .*profile file, ie, it has 
the same effect as logging in from a console. For a normal su it does not have the 
same effect as a login, because not all environment variables are changed.

To better understand this:
$echo $PATH
$su
password:
#echo $PATH
#exit
exit
$su -
password:
#echo $PATH

(path outputs deleted here)
Try man su :).

Devdas Bhagat
--
Your computer will not work today due to magnetic storms



------------------------------------------------------------
Nettaxi Shopping Exchange - compare products and prices, even negotiate!
You pick your own price.... http://www.nextag.com/serv/nettaxi/buyer/Home.jsp



----------------------------------------------
LIH is all for free speech.  But it was created
for a purpose.  Violations of the rules of
this list will result in stern action.

Reply via email to