[Bug 584249] Re: pam_env does not evaluate ~/.pam_environment
Andrey Bondarenko
abondarenko at users.sourceforge.net
Tue May 31 05:04:08 UTC 2011
I suppose this issue my be related to my question 159345 (it is about
Natty). The cause of skipping .pam_environment some environment
variables may be in spaces within variable values. Looks like conffile
parser interprets quotes differently. Variables with quoted values
because of spaces got skipped with parse error.
You may check this with the following test. Please be careful. If pam
configuration is broken, you may be not able to login.
In ~/.pam_environment add:
MYVAR0="SOME_VALUE"
MYVAR1="SOME VALUE"
In file /etc/pam.d/login find a line with pam_env.so and add there
option debug like follows:
session required pam_env.so debug readenv=1
Then login open a new console session and check results. In the session:
$ env | grep MYVAR
MYVAR0="SOME_VALUE"
only MYVAR0 is defined, but MYVAR1 is skipped. Also in /var/log/auth.log
you can see something like that:
May 31 11:02:39 host login[26761]: pam_env(login:session): Unrecognized
Option: VALUE"#012 - ignoring line
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to pam in Ubuntu.
https://bugs.launchpad.net/bugs/584249
Title:
pam_env does not evaluate ~/.pam_environment
Status in “pam” package in Ubuntu:
Invalid
Bug description:
In Ubuntu 10.04, any environment variables assigned in ~/.pam_environment do not seem to be applied.
for example if I have a ~/.pam_environment as follows
MY_VARIABLE="SOMETHING"
after restarting and starting a shell I would expect
echo $MY_VARIABLE
to respond with
SOMETHING
but instead the result is blank
More information about the foundations-bugs
mailing list