From: Magicloud Magiclouds on
I looked over the init scripts. I cannot find the exact place that
reads /etc/environment.
--
竹密岂妨流水过
山高哪阻野云飞
From: Roger Leigh on
On Wed, Oct 28, 2009 at 05:38:05PM +0800, Magicloud Magiclouds wrote:
> I looked over the init scripts. I cannot find the exact place that
> reads /etc/environment.

pam_env.so is part of the PAM auth setup. Note you should really
use /etc/security/pam_env.conf instead, AFAICT /etc/environment is
read for backwards compatibility, but is deprecated.

Also look at the files in /etc/pam.d. Services such as login, ssh
and gdm/kdm which start user sessions have lines like:

session required pam_env.so readenv=1

which set up the user environment using /etc/security/pam_env.conf
and/or /etc/environment.


Regards,
Roger

--
.''`. Roger Leigh
: :' : Debian GNU/Linux http://people.debian.org/~rleigh/
`. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/
`- GPG Public Key: 0x25BFB848 Please GPG sign your mail.
From: green on
Roger Leigh wrote at 2009-10-28 04:56 -0500:
> On Wed, Oct 28, 2009 at 05:38:05PM +0800, Magicloud Magiclouds wrote:
> > I looked over the init scripts. I cannot find the exact place that
> > reads /etc/environment.
>
> pam_env.so is part of the PAM auth setup. Note you should really
> use /etc/security/pam_env.conf instead, AFAICT /etc/environment is
> read for backwards compatibility, but is deprecated.

Is the file deprecated in Lenny, or later? pam_env(8) mentions nothing about
deprecation of the file, just claims it is the default.