Received: (at submit) by bugs.debian.org; 14 Jun 2000 02:53:07 +0000 From nagya@inf.elte.hu Tue Jun 13 21:53:07 2000 Return-path: Received: from valerie.inf.elte.hu [157.181.161.1] by master.debian.org with esmtp (Exim 3.12 2 (Debian)) id 1323Ig-0001GC-00; Tue, 13 Jun 2000 21:53:06 -0500 Received: from babel.inf.elte.hu (babel.inf.elte.hu [157.181.161.4]) by valerie.inf.elte.hu (8.8.8/8.8.8) with ESMTP id EAA21059 for ; Wed, 14 Jun 2000 04:53:04 +0200 (MET DST) Received: (from nagya@localhost) by babel.inf.elte.hu (8.9.3/8.9.3/Debian 8.9.3-21) id EAA17706; Wed, 14 Jun 2000 04:53:04 +0200 X-Authentication-Warning: babel.inf.elte.hu: nagya set sender to nagya@inf.elte.hu using -f To: submit@bugs.debian.org Subject: general: setting `global' env. variables, esp. PATH From: NAGY Andras Date: 14 Jun 2000 04:53:04 +0200 Message-ID: Lines: 38 User-Agent: Gnus/5.0806 (Gnus v5.8.6) XEmacs/20.4 (Emerald) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Delivered-To: submit@bugs.debian.org Package: general Version: N/A There should be one, central location for the initial environment variables that are to be set in each login session, independently of the method used for logging in or the shell used by the user (if any). Consider a system administrator who would like to add a new directory to the default PATH. Where should be the modification performed? There's a PATH setting in /etc/login.defs. Change it there? No, bash's /etc/profile resets the PATH to "Debian's default". Change /etc/profile? Bad choice, since it is not used by other shells, like zsh, or X sessions. Add a PATH line to /etc/environment? Bad luck, /etc/profile comes after it, so bash wins again. Same for /etc/security/pam_env.conf. Let's give up the principle of `one setting -- one config file' and change all of the above, plus the startup files of any other shells that might be in use and the maintainer was smart enough to mess with the PATH in default startup scripts? Sounds bad, and not even works in some cases. Zsh only sets the PATH in it's startup script if the inherited PATH is empty or equals to some dumb default. But sshd uses a different dumb default, therefore zsh's PATH (and neither the one in /etc/login.defs) does not apply when logging in through ssh. This situation sucks. Debian should make a policy decision where to set global environment variables (PAM's pam_env.so + /etc/environment would be a good choice), and modify related packages (that deal with user login, like login or sshd, and shells) to use this single mechanism for setting the initial environment and not to mess with it themselves.