Path: utzoo!mnetor!uunet!husc6!cmcl2!nrl-cmf!ames!pasteur!ucbvax!decvax!decwrl!labrea!denali!karish From: karish@denali.UUCP (karish) Newsgroups: comp.unix.questions Subject: Re: 4bsd .login and .cshrc Message-ID: <27@denali.UUCP> Date: 26 Mar 88 16:30:29 GMT References: <326@ivory.SanDiego.NCR.COM> <7765@apple.Apple.Com> <27717@linus.UUCP> <111@infmx.UUCP> Reply-To: crkarish@stanford.edu (Chuck Karish) Organization: Mindcraft, Inc. Lines: 29 Summary: AIX is different. In article <111@infmx.UUCP> aland@infmx.UUCP (alan denney) writes: >In article <27717@linus.UUCP>, jfjr@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