Hi Tomas,
Do you think the below could be done, from PoV of PAM/authconfig?
On 04/04/2017 06:06 PM, Nikolai Kondrashov wrote:
> At the moment users logging into Fedora on a text terminal (console, SSH,
> etc.) get their locale environment variables (LANG, LC_ALL, etc.) set up by
> the shell they use. I.e. the shell ultimately sources the /etc/locale.conf
> file. This works fine in most cases.
>
> However, if the user has his/her "shell" set to any program that is not one
of
> the traditional shells, i.e. it doesn't source any shell profiles, or even
> doesn't understand any shell language at all, then that program doesn't get
> locale settings.
>
> Theoretical examples can include captive portals on jump-hosts, or
> special-purpose systems with dedicated TUI instead of a shell. A practical
> example that concerns me is a user session recording program [1] which needs
> to run before user shell, and intercept all I/O going to and from the
> terminal.
>
> I would like to know if it is possible to change Fedora to provide the locale
> variables through the environment user "shell" inherits, instead of
expecting
> it to read /etc/locale.conf, which is distro-specific.
>
> This is done in Debian already. During session setup in login/sshd/etc. they
> use pam_env to read /etc/default/locale. Similar thing is possible to do in
> Fedora too. E.g. just put this into /etc/pam.d/system-auth:
>
> session required pam_env.so envfile=/etc/locale.conf
>
> Nick
>
> [1] Tlog - terminal I/O logger
>
https://github.com/Scribery/tlog