SGI 'su'
Mark Callow
msc at ramoth.SGI.COM
Wed Mar 15 14:42:36 AEST 1989
In article <8903141821.AA07266 at adt.uucp>, madd at 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
More information about the Comp.sys.sgi
mailing list