$PATH in su mode under SV.2
Michael Crom
crom at cuuxb.UUCP
Thu Aug 15 23:31:58 AEST 1985
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
More information about the Comp.unix
mailing list