You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What happened:
Added environment variables into /etc/environment and /etc/security/pam_env.conf, these do not appear in the user session when using Teleport (but do with OpenSSH).
What you expected to happen:
With PAM enabled and using the default configuration (sshd), the environment should be very similar when logging in via OpenSSH vs. Teleport (with Teleport's additional environment variables in place). On a side note, when running sudo su as the login user, the environment is correct (since config for su contains pam_env.so as well).
Also, other environment variables aren't exactly as expected, like PATH is different from what an SSH session via OpenSSH shows.
How to reproduce it (as minimally and precisely as possible):
configure Teleport with PAM enabled:
(...)
pam:
enabled: yes
service_name: "sshd"
In Ubuntu 16.04, /etc/pam.d/sshd references pam_env.so:
(...)
# Read environment variables from /etc/environment and
# /etc/security/pam_env.conf.
session required pam_env.so # [1]
# In Debian 4.0 (etch), locale-related environment variables were moved to
session required pam_env.so user_readenv=1 envfile=/etc/default/locale
Environment:
Teleport version (use teleport version): Teleport Enterprise v4.0.0git:v4.0.0-0-gc7f55ac3 go1.12.1
OS (e.g. from /etc/os-release): Ubuntu 16.04
The text was updated successfully, but these errors were encountered:
I suspect Teleport has actually been reading /etc/environment and /etc/security/pam_env.conf but not doing anything with the environment variables it reads in. We'll need to update Teleport to get the list of environment variables the PAM modules found and then add then into the environment of the child process like OpenSSH does: https://github.com/openssh/openssh-portable/blob/V_8_1/session.c#L1142-L1145
What happened:
Added environment variables into
/etc/environment
and/etc/security/pam_env.conf
, these do not appear in the user session when using Teleport (but do with OpenSSH).What you expected to happen:
With PAM enabled and using the default configuration (sshd), the environment should be very similar when logging in via OpenSSH vs. Teleport (with Teleport's additional environment variables in place). On a side note, when running
sudo su
as the login user, the environment is correct (since config forsu
containspam_env.so
as well).Also, other environment variables aren't exactly as expected, like
PATH
is different from what an SSH session via OpenSSH shows.How to reproduce it (as minimally and precisely as possible):
In Ubuntu 16.04,
/etc/pam.d/sshd
referencespam_env.so
:Environment:
teleport version
): Teleport Enterprise v4.0.0git:v4.0.0-0-gc7f55ac3 go1.12.1The text was updated successfully, but these errors were encountered: