Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!purdue!decwrl!sgi!msc@ramoth.SGI.COM From: msc@ramoth.SGI.COM (Mark Callow) Newsgroups: comp.sys.sgi Subject: Re: SGI 'su' Summary: an alternative Message-ID: <28701@sgi.SGI.COM> Date: 15 Mar 89 04:42:36 GMT References: <8903141821.AA07266@adt.uucp> Sender: daemon@sgi.SGI.COM Organization: Silicon Graphics, Inc., Mountain View, CA Lines: 26 In article <8903141821.AA07266@adt.uucp>, madd@adt.UUCP (jim frost) writes: > I would appreciate it very, very much if someone would fix 'su' so it > properly reads the destination user's shell configuration files. I'm > about to hack one together but I really shouldn't have to do that. > > This is very important to me since our root .cshrc properly sets the > prompt to the hash mark, but this is never called when su'ing. If you > forget, or if someone walks up, you or they will unknowingly be root. > This is of course very dangerous even if security isn't an issue. Here's how I deal with that problem in my .cshrc without changing su. I ran into this when I first started working at SGI. As far as I recall the problem isn't with su but with the way System V handles the "effective user" compared with BSD. if ($?prompt) then if ("$prompt" == "# ") then set prompt = `hostname`'#\! ' set path=(/usr/local/bin /usr/bsd /bin /etc /usr/etc /usr/bin /usr/sbin /usr/hosts /usr/games /usr/NeWS/bin /usr/demos/bin) umask 22 else set prompt = `hostname`'{\!} ' endif endif -- -Mark