4bsd .login and .cshrc

karish karish at denali.UUCP
Sun Mar 27 02:30:29 AEST 1988


In article <111 at infmx.UUCP> aland at infmx.UUCP (alan denney) writes:
>In article <27717 at linus.UUCP>, jfjr at mitre-bedford.ARPA (Jerome Freedman) writes:
>>   Excuse my ignorance but this is a chance to nibble away at
>> it. Could someone explain to me, for 4.2 especially the Sun
>> version exactly how and in what order the .login and .cshrc
>> files are read (executed?). How are these files handled when
>> you initiate Suntools? How are they handled if you "su" to
>> another account?
>
>The .cshrc file is read and executed (if possible) upon every csh
>fireup, INCLUDING the login shell.  The .login is read and executed 
>AFTER the .cshrc.  If either file is not owned by the person logging
>in, it is not executed.  (Of course, root can use /usr/5bin/chown to
>change ownership for a new user.)
>
>> How are they handled if you "su" to another account? 
>
>When using "su": if the default shell for the user su'd to is csh,
>that user's .cshrc is executed.

Csh behaves differently on some SysV systems.  AIX doesn't source
.cshrc on an su.  This causes me no end of annoyance and confusion
when I maintain workstations whose users insist on making root's
default shell csh (yes, I know how to fix this with an alias).

AIX also will refuse a login if the user does not own his/her
.cshrc, .login, or .profile.

Chuck



More information about the Comp.unix.questions mailing list