Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #224224
| From | l0f4r0@tuta.io |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: Systemd user environment variables not picked up for me |
| Date | 2020-06-30 08:40 +0200 |
| Message-ID | <Ani5Y-6Fh-7@gated-at.bofh.it> (permalink) |
| References | <AmYTD-3nX-1@gated-at.bofh.it> <An430-6nE-21@gated-at.bofh.it> <An4w1-6MV-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi,
29 juin 2020 à 17:52 de wooledg@eeg.ccf.org:
> The holy grail, for me, would have been a way to specify environment
> variables that are applied to all user logins, whether by console login,
> or ssh, or Display Manager, independent of the user's login shell.
> And those variables must include a way to reference existing shell
> variables like $HOME, so that one can (for example) set MAIL=$HOME/Maildir/
> somewhere and have it actually *work*.
>
> pam_env gives us the /etc/environment file which is potentially useful,
> as it does in fact support many of the features I was looking for. But
> you cannot use reference to other shell variables there. If you put
> MAIL=$HOME/Maildir/ in /etc/environment and login, you will have the
> literal characters $ H O M E in the resulting variable.
>
> Even more subtly, it turns out that at the time this particular PAM
> module runs, the HOME variable isn't even *set* yet. So, even if you
> used some module that can use existing variables, it wouldn't help
> for this. (Yes, I went down that pathway too.)
>
It seems you can reconstruct those "early" variables like the following:
HOME=/home/@{PAM_USER}
Or use @{HOME} directly since PAM 1.2.0.
Source: https://unix.stackexchange.com/questions/258246/why-does-pam-environment-not-include-home-in-my-new-path
Best regards,
l0f4r0
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Systemd user environment variables not picked up for me Thomas Pircher <thp+debian@p5r.uk> - 2020-06-29 12:10 +0200
Re: Systemd user environment variables not picked up for me Thomas Pircher <thp+debian@p5r.uk> - 2020-06-29 13:10 +0200
Re: Systemd user environment variables not picked up for me Greg Wooledge <wooledg@eeg.ccf.org> - 2020-06-29 15:40 +0200
Re: Systemd user environment variables not picked up for me Thomas Pircher <thp+debian@p5r.uk> - 2020-06-29 19:10 +0200
Re: Systemd user environment variables not picked up for me l0f4r0@tuta.io - 2020-06-29 17:40 +0200
Re: Systemd user environment variables not picked up for me Greg Wooledge <wooledg@eeg.ccf.org> - 2020-06-29 18:10 +0200
Re: Systemd user environment variables not picked up for me Thomas Pircher <thp+debian@p5r.uk> - 2020-06-29 19:10 +0200
Re: Systemd user environment variables not picked up for me Andrei POPESCU <andreimpopescu@gmail.com> - 2020-06-29 22:00 +0200
Re: Systemd user environment variables not picked up for me Greg Wooledge <wooledg@eeg.ccf.org> - 2020-06-29 22:20 +0200
Re: Systemd user environment variables not picked up for me l0f4r0@tuta.io - 2020-06-30 08:40 +0200
Re: Systemd user environment variables not picked up for me Greg Wooledge <wooledg@eeg.ccf.org> - 2020-06-30 14:30 +0200
csiph-web