4bsd .login and .cshrc

Eduardo Krell ekrell at hector.UUCP
Fri Apr 1 01:29:30 AEST 1988


Some people are confusing "su" with "su -". According to the man page,
"The - option simulates a full login" (in 4.3 BSD).

The System V man page is less cryptic:

     If	the first argument to su
     is	a -, the environment will be changed to	what would be
     expected if the user actually logged in as	the specified
     user.  This is done by invoking the program used as the
     shell with	an arg0	value whose first character is -, thus
     causing first the system's	profile	(/etc/profile) and then
     the specified user's profile (.profile in the new HOME
     directory)	to be executed.	 Otherwise, the	environment is
     passed along with the possible exception of $PATH,	which is
     set to /bin:/etc:/usr/bin for root.
    
    Eduardo Krell                   AT&T Bell Laboratories, Murray Hill, NJ

    UUCP: {ihnp4,ucbvax}!ulysses!ekrell		ARPA: ekrell at ulysses.att.com



More information about the Comp.unix.questions mailing list