[CS-FSLUG] How to resolve anapparent Linux crash

Frank Bax fbax at sympatico.ca
Sat Aug 28 00:32:33 CDT 2004


At 01:14 AM 8/28/04, linux at rmf.mailshell.com wrote:

>David M. wrote:
>
>>On Wednesday 25 August 2004 09:06 am, Eduardo Sanchez wrote:
>>
>>
>>>Ruth, thanks for replying.
>>>
>>
>>
>>
>>>Now, get the root prompt. Type the 'su' command. When the command asks
>>>you for a password, supply your *root* password.
>>>
>>
>>I have found that just plain "su" isn't as powerful as "su -".
>>
>>When I log into root from console I alway use "su -"
>>
>Thanks, David,
>I did learn about su from the Linmodem fellow, but not this -. What does 
>that do?


"su -"  simulates a full login.  Without the dash, all (many?) environment 
variables are unchanged when switching to superuser.  With the dash, the 
environment is much more similar to an actual root login.

Either form of the "su" command is preferred over actually doing login as 
root because use of the su command is logged.  For the truly security 
conscious, there is also the "sudo" command.  Combined with visudo command 
that edit/validates the /etc/sudoers file, this provides even more control 
- by restricting which commands a user can invoke as root.  It also allows 
for issuing commands without root password.  If you configure sudo with 
passwordless access to a shell like csh or ksh, then you basically have a 
passwordless version of "su" (I think it works like su without the dash).

Frank 





More information about the Christiansource mailing list