Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!rutgers!cbmvax!snark!eric From: eric@snark.thyrsus.com (Eric S. Raymond) Newsgroups: comp.unix.questions Subject: Re: Where does PATH at login come from? Message-ID: <1YbsdS#3YjQ008Hs7806Hk6Bh11KX7p=eric@snark.thyrsus.com> Date: 28 Nov 90 15:10:01 GMT References: <18613@unix.SRI.COM> <14583@smoke.brl.mil> <1990Nov27.125834.6039@diku.dk> <1990Nov27.163915.3799@diku.dk> Lines: 35 In <1990Nov27.163915.3799@diku.dk> Kim Christian Madsen wrote: > thorinn@rimfaxe.diku.dk (Lars Henrik Mathiesen) writes: > >gwyn@smoke.brl.mil (Doug Gwyn) writes: > >>Typically there are three possible sources for the initial PATH: > >> The shell itself will have some hard-wired default PATH. > >> A system-wide configuration file (/etc/profile, for example) > >> can reset the PATH, if the shell reads the configuration file. > >> Each user can have his own configuration file in his home > >> directory; names are usually .profile (sh) and .login (csh). > > >Four and five: login and init. On our system (Mt. Xinu 4.3), login > >does create an initial environment with a PATH, while init doesn't. > > Not to mention .cshrc (csh) or .tcshrc (tcsh) in a networking environment, > where .login (csh && tcsh) is not sourced when logging in remote. And > /etc/cshrc the csh equivalent to the systemwide /etc/profile in the Bourne > Shell, supported by some csh's. > > V7, System III, and BSD derived systems have a minimal PATH set by the > login program, while System V derived systems have no builtin PATH from > login, they get the PATH from the places mentioned by Doug above and the > ones given by me. ...but if your system has an /etc/default/login, login may set it from there. Here's the one from my AT&T 6386 (running SVr3.2). TIMEZONE=EST5EDT HZ=100 ULIMIT=12280 # was 4096 CONSOLE=/dev/console PASSREQ=NO # was YES ALTSHELL=YES SUPATH=/bin:/etc/:/usr/bin/:/usr/local/bin:/usr/X/bin:/usr/X/adm -- Eric S. Raymond = eric@snark.thyrsus.com (mad mastermind of TMN-Netnews)