[Bug 1211799] environment ignored
https://bugzilla.suse.com/show_bug.cgi?id=1211799 https://bugzilla.suse.com/show_bug.cgi?id=1211799#c8 --- Comment #8 from Dmitry Markov <werwolf131313@gmail.com> --- (In reply to Valentin Lefebvre from comment #5)
(In reply to Dmitry Markov from comment #0)
all environments in files /etc/environment.d/* & /etc/environment are ignored by the system.
Hello, Thanks for your message.
pam_env.so will only check environment variable in /etc/environment file not in directory /etc/environment.d/*. If you want to use multiple environment files you need to add the argument "envfile" in the line wher pam_env.so is called in some pam configuration files. To knwo where pam_env is called you can run the following command:
`grep "pam_env" /usr/lib/pam.d/* /etc/pam.d/*`
But it looks like your /etc/environment file is skipped. From my test, I don't get any issue with that with Tumbleweed image. Could it be possible to have the content of your file /etc/environment please ?
(In reply to Dead Mozay from comment #2)
kernel: with environment: plymouthd[508]: 00:00:05.290 main.c:2017:initialize_environment : source built on May 22 2023 plymouthd[990]: 00:00:08.299 main.c:2017:initialize_environment : source built on May 22 2023 (systemd)[2073]: pam_env(systemd-user:session): Unable to read configuration file /usr/etc//environment line 8: Missing delimiter lightdm[1996]: pam_env(lightdm-autologin:session): Unable to read configuration file /usr/etc//environment line 8: Missing delimiter sudo[5576]: pam_env(sudo:setcred): Unable to read configuration file /usr/etc//environment line 8: Missing delimiter sudo[5576]: pam_env(sudo:session): Unable to read configuration file /usr/etc//environment line 8: Missing delimiter
This happens with any variable. But if you do
source /usr/etc/environment
then the variable works without problems
Thanks for your feedback too.
Your /usr/etc/environment file looks to be not well formatted to the pam_env library. Especially at the line 8 where it should miss the delimiter "=". Same, should it be possible to have the content of your /usr/etc/environment file please ?
[werwolf@work] ~ ❯ cat /etc/environment TEST_ENV="test" [werwolf@work] ~ ❯ echo $TEST_ENV [werwolf@work] ~ ❯ grep "pam_env" /usr/lib/pam.d/* /etc/pam.d/* /usr/lib/pam.d/common-auth:auth required pam_env.so /usr/lib/pam.d/common-session:session optional pam_env.so /usr/lib/pam.d/common-session-nonlogin:session optional pam_env.so /etc/pam.d/common-auth:auth required pam_env.so /etc/pam.d/common-auth-pc:auth required pam_env.so /etc/pam.d/common-session:session optional pam_env.so /etc/pam.d/common-session-nonlogin:session optional pam_env.so /etc/pam.d/common-session-nonlogin-pc:session optional pam_env.so /etc/pam.d/common-session-pc:session optional pam_env.so -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com