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
In Ubuntu install PAM module that runs task on login (e.g. libpam-tmpdir which sets TMP)
Terminate WSL VM using wsl.exe -t Ubuntu
Re-run WSL and check if PAM module caused desired effect (in case of libpam-tmpdir which installs to common-session if TMP environment variable is set to /tmp/user/<UID>
Expected Behavior
PAM module applies desired effect (e.g. setting environment variable in case of libpam-tmpdir) on user session.
Actual Behavior
PAM module does not seem to run at all. PAM does not seem to be invoked in process of obtaining shell.
I only have limited knowledge of how PAM works. We would like to rely on it for setting certain aspects of our development environment as we do on bare-metal Ubuntu installs (so that we don't have discrepancy between both environments). It seems PAM is usually invoked by whatever login manager and not shell (which makes sense). That also renders --shell-type login ineffective.
There's probably some magic in place already as systemd (we have it enabled in [boot] section of wsl.conf) seems to run its own PAM module (sd-pam is visible in systemctl status --user).
I can get this work as expected by doing wsl.exe -d Ubuntu -u root login and logging as desired user, or even su can do. I guess all those commands invoke PAM, but WSLs mechanism to get shell running does not.
Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered:
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.
Windows Version
Microsoft Windows [Version 10.0.22621.1413]
WSL Version
1.1.6.0
Are you using WSL 1 or WSL 2?
Kernel Version
5.15.90.1
Distro Version
Ubuntu 22.04
Other Software
No response
Repro Steps
libpam-tmpdir
which setsTMP
)wsl.exe -t Ubuntu
libpam-tmpdir
which installs tocommon-session
ifTMP
environment variable is set to/tmp/user/<UID>
Expected Behavior
PAM module applies desired effect (e.g. setting environment variable in case of
libpam-tmpdir
) on user session.Actual Behavior
PAM module does not seem to run at all. PAM does not seem to be invoked in process of obtaining shell.
I only have limited knowledge of how PAM works. We would like to rely on it for setting certain aspects of our development environment as we do on bare-metal Ubuntu installs (so that we don't have discrepancy between both environments). It seems PAM is usually invoked by whatever login manager and not shell (which makes sense). That also renders
--shell-type login
ineffective.There's probably some magic in place already as
systemd
(we have it enabled in[boot]
section of wsl.conf) seems to run its own PAM module (sd-pam is visible insystemctl status --user
).I can get this work as expected by doing
wsl.exe -d Ubuntu -u root login
and logging as desired user, or evensu
can do. I guess all those commands invoke PAM, but WSLs mechanism to get shell running does not.Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered: