Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!romp!auschs!awdprime!talmage.austin.ibm.com!john From: john@talmage.austin.ibm.com (Overman) Newsgroups: comp.unix.questions Subject: Re: Where does PATH at login come from? Message-ID: <4380@awdprime.UUCP> Date: 28 Nov 90 20:51:57 GMT References: <18613@unix.SRI.COM> Sender: news@awdprime.UUCP Reply-To: john@cela.austin.ibm.com (Overman) Organization: IBM Austin, TX Lines: 39 In article <18613@unix.SRI.COM>, ric@ace.sri.com (Richard Steinberger) writes: > From: ric@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@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@cela.austin.ibm.com uunet.UU.NET!cs.utexas.edu!ibmchs!auschs!cela.austin.ibm.com!john