Re: default search PATH
I wrote a mini-howto exactly on this more than a year ago.
It should still be in the usual places (PATH-HOWTO). I
wrote it mainly checking things against Debian 1.2 and it
is last updated for 1.3. Maybe it is time to update it.
However, I don't have any perfect solution to the problem.
There are quite tricky cases where path is strange.
Of course, it could help a lot if Debian policy would state
that what the path should be in different cases. Implementing
it requires modifications in many places and it is still not
nice because the user don't have an easy way to modify it globally.
PS. Main things you forgot to mention are X, daemons and cron
Esa Turtiainen http://www.turtiainen.dna.fi
On Wed, Oct 21, 1998 at 07:47:49PM -0400, Andrew Pimlott wrote:
> I hope this is the right place to post this--it seems to have user,
> policy, and developer aspects, so I just defaulted to the list I'm
> subscribed to. I'm not a Debian developer, though.
> I've used Debian 2.0 and 2.1 for a few months. I've been irked by the
> fact that users wind up with a different search PATH depending on what
> shell they use and how they log on to the system (examples below).
> Looking through the documentation, I found in the User Tutorial
> The default [$PATH] value on Debian systems is:
> Ok, so maybe some package just made a mistake. However, upon further
> investigation ...
> 1. There is no mention of the PATH in the Policy Manual.
> 2. There does not seem to be any coordinated effort to do something sane.
> (3. I didn't find any discussion or explanation of 1. and 2. in the list
> I was quite surprised to find this issue unaddressed, since Debian is
> well thought-out in most respects. I hope some developers on this list
> are interested in rectifying it. If so, here's some more background
> information and some sugestions.
> - login (login-980403-0.3) has the path /bin:/usr/bin compiled in, and the
> configuration file /etc/login.defs sets the path to the same for non-root
> - sshd (ssh-1.2.26-1) has the path /usr/bin:/bin:/usr/bin compiled in.
> - /etc/profile (bash-2.01.1-4) unconditionally sets the path to the one
> in the Tutorial. /etc/profile is sourced at login.
> - /etc/zshenv (zsh-3.1.2-8) does:
> if [[ -z "$PATH" || "$PATH" == "/bin:/usr/bin" ]]
> then export PATH="/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games"
> /etc/zshenv is sourced on every invocation of zsh
> - tcsh (tcsh-6.07.06-6) is oblivious:
> % grep -i path /etc/*csh*
> You can already see that the interaction between login, sshd, and shells
> can produce several different $PATH's. I'm out of energy now, but I can
> only imagine what I'd find looking into xdm, rsh, other shells, etc.
> As for a solution... In /etc/login.defs, a comment suggests that login
> should set a minimal path, and shell startup files should set a more
> complete path. If that were agreed upon, it should be the responsibility
> of each shell packager to make sure the shell _unconditionally_ sets the
> path to the default Debian path--but only for login shells. xdm (and
> workalikes) should probably be considered a shell for this purpose, though
> I don't know xdm that well. Additionally, the minimal path set by login
> should be standardized, and sshd et al should set the same minimal path.
> I hope something (not necessarily the above, of course) can be agreed upon
> and added to policy. It would remove one of the most visible
> inconsistencies in Debian. But whether it is policy or not, I hope that
> packagers will correct the obvious blunders--such as the silly path set
> by sshd and the (clearly?) wrong behaviour by zsh and tcsh. I filed a
> bug against sshd when I first started looking into this issue, but I have
> not received a response. Maybe if I'm encouraged I'll file more bugs.
> To UNSUBSCRIBE, email to firstname.lastname@example.org
> with a subject of "unsubscribe". Trouble? Contact email@example.com