sudo does not read /etc/environment on interactive logins (directly, not through pam_env)
Bug #25700 reported by
Daniel Hahler
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
sudo |
Unknown
|
Unknown
|
|||
sudo (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
sudo (and su) do not work with pam_env.
Adding a line like:
auth required pam_env.so
to /etc/pam.d/sudo should put the environment variables from /etc/environment into the environment of an
interactive session created by "sudo -i" or "su -".
This is especially bad because /etc/environment is the place where Ubuntu defines the charset (with LANG) and
not setting LANG to xx_XX.UTF8 causes the shell (bash) to misbehave on umlauts for example: I cannot type
them on the command line and they're displayed wrong with "ls" and other tools.
Related branches
summary: |
- sudo does not use /etc/environment on interactive logins (through - pam_env) + sudo does not read /etc/environment on interactive logins (directly, not + through pam_env) |
To post a comment you must log in.
Is that still an issue for you? Normally the sudo shell inherits locale settings from the user's shell, i. e. it preserves the locale.