[net.unix] $PATH in su mode under SV.2

iannucci@sjuvax.UUCP (iannucci) (08/15/85)

        
             I and my colleagues at work, where we run SV.2.2 on a 3B2, 
are being slowly driven out of our minds. The problem is that in su mode,
the PATH is set to :/usr/bin:/etc:/bin.  It doesn't even include the pwd!
This can get really maddening, and we've tried everything we can think of 
to reset that PATH. Nothing in /etc/profile seems to have any direct effect.

        If you can help me with this, please respond by mail, as I don't read
these groups often enough. My fingers have had it with typing 7 foot paths!

-- 
If I could walk THAT way... 

Dave Iannucci @ St. Joseph's University, Philadelphia [40 00' N 75 15' W]
{{ihnp4 | ucbvax}!allegra | {psuvax1}!burdvax | astrovax}!sjuvax!iannucci

crom@cuuxb.UUCP (Michael Crom) (08/15/85)

One way to set the PATH variable is to create a /.profile.
In it you would put something like this:


PATH=/bin:/usr/bin:/etc:/usr/lbin:/whatever/wherever::
export PATH

Then, instead of just using "su", use "su -".  The minus sign says
to invoke the that users .profile (which will set the PATH in this case).
Unfortunately, it also puts you in roots home directory -- /

If you had source for su, you could change change a define to whatever you
wanted:

#define SUPATH "PATH=whatever"

But most 3b2 users don't have source, so you're stuck with the first method.



					Mike Crom
					Lisle, Il