2012-01-24 00:24:26 |
Ben Howard |
description |
The default /etc/pam.d/sshd configuration has:
# Read environment variables from /etc/environment and
# /etc/security/pam_env.conf.
#auth required pam_env.so # [1]
# In Debian 4.0 (etch), locale-related environment variables were moved to
# /etc/default/locale, so read that as well.
auth required pam_env.so envfile=/etc/default/locale
The default SSH client configuration has "Send LC_*" and the default SSH server configuration has "Accept LC_*". This prevent any user locale settings from being sent via SSH.
For example, if /etc/default/locale has:
LANG=en_US.UTF-8
LC_COLLATE=C
Then running "LANG=zh_SG.utf8 LC_COLLATE=en_US.UTF-8 ssh myspecialhost.foo.bar.com" yields:
ubuntu@ip-10-12-15-243:~$ locale
LANG=en_US.UTF-8
LC_COLLATE=C
(output truncated for clarity)
While having a blank /etc/default/locale yeilds:
ubuntu@ip-10-12-15-243:~$ locale
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=zh_SG.utf8
LC_COLLATE=en_US.UTF-8
(output truncated for clarity)
I think, although I am not sure, that this is a bug with the default configuration. It means that in order for server to accept multple languages or LC_* bindings, the system locale default would have to be unset. Effectively this is forcing the system default on all users. |
The default /etc/pam.d/sshd configuration has:
# Read environment variables from /etc/environment and
# /etc/security/pam_env.conf.
#auth required pam_env.so # [1]
# In Debian 4.0 (etch), locale-related environment variables were moved to
# /etc/default/locale, so read that as well.
auth required pam_env.so envfile=/etc/default/locale
The default SSH client configuration has "Send LC_*" and the default SSH server configuration has "Accept LC_*". The PAM configuration prevents any user-overrides for locale settings.
For example, if /etc/default/locale has:
LANG=en_US.UTF-8
LC_COLLATE=C
Then running "LANG=zh_SG.utf8 LC_COLLATE=en_US.UTF-8 ssh myspecialhost.foo.bar.com" yields:
ubuntu@ip-10-12-15-243:~$ locale
LANG=en_US.UTF-8
LC_COLLATE=C
(output truncated for clarity)
While having a blank /etc/default/locale yeilds:
ubuntu@ip-10-12-15-243:~$ locale
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=zh_SG.utf8
LC_COLLATE=en_US.UTF-8
(output truncated for clarity)
I think, although I am not sure, that this is a bug with the default configuration. It means that in order for server to accept multple languages or LC_* bindings, the system locale default would have to be unset. Effectively this is forcing the system default on all users. |
|