Where does PATH at login come from?
Overman
john at talmage.austin.ibm.com
Thu Nov 29 07:51:57 AEST 1990
In article <18613 at unix.SRI.COM>, ric at ace.sri.com (Richard Steinberger) writes:
> From: ric at ace.sri.com (Richard Steinberger)
> Subject: Where does PATH at login come from?
> Date: 26 Nov 90 16:57:04 GMT
> Organization: SRI International
>
> When I log on to some of our BSD unix machines (Alliant, Multiflow,
> DEC 3100), I notice that the PATH variable has some initial members,
> usually something like (/usr/ucb /usr/bin /bin .). Can anyone
> let me know where these initial elements of PATH come from?
> Is this at all configurable? Thanks to any and all who reply.
>
> regards,
>
> ric steinberger
> ric at ace.sri.com
The PATH variable is actually set in many places during the a normal
login process. Something similar to this:
1) INIT --> PATH=/bin:/usr/bin:/etc
2) LOGIN --> PATH=/bin:/usr/bin:/usr/ucb:/etc
3) /etc/environment --> PATH=/bin:/usr/bin:/usr/ucb:/etc:
4) /etc/profile --> PATH=/bin:/usr/bin:/usr/ucb:$HOME/bin::
Since you can't (shouldn't) change the init and login binaries, the first
place you can change the value of PATH is in /etc/environment. Of course,
this sequence of events is slightly different with remote logins where the
value is usually set in rsh itself (for security reasons).
-JoHn A.
john at cela.austin.ibm.com
uunet.UU.NET!cs.utexas.edu!ibmchs!auschs!cela.austin.ibm.com!john
More information about the Comp.unix.questions
mailing list