#533525 dropbear does not set remote user's locale

#533525#5
Date:
2009-06-18 11:23:39 UTC
From:
To:
Dropbear does not set the locale of a remotely logged-in user to the
system default in /etc/default/locale. Anyone who logged in remotely
will have POSIX in their LANG and LC_* variables.

There is a Ubuntu bug report explaining the same situation.
https://bugs.launchpad.net/ubuntu/+source/dropbear/+bug/232064

There is a work around to this problem as described in
http://wiki.debian.org/Locale, is to add

: ${LANG:=YOUR_LOCALE}; export LANG

to /etc/profile.

#533525#10
Date:
2014-03-26 17:26:43 UTC
From:
To:
In openssh this is done by /etc/pam.d/sshd :

session       required   pam_env.so readenv=1 envfile=/etc/default/locale

but dropbear is:

1. not compiled with pam support (configure --enable-pam)
2. uses the pam name "sshd" in svr-authpam.c but does not install a
/etc/pam.d/sshd file
3. does not include the necessary code to progagate the pam
environment variables (see fetch_pam_environment and copy_environment
in openssh auto-pam.c). It probably needs to call pam_open_session as
well as pam_start.