When I connect through SSH to my Centos 6 box, language are mixed: connection is in english but password change dialog is in french. Example:
$ ssh aa@quercy You are required to change your password immediately (root enforced) Last login: Fri Oct 30 11:41:31 2015 from quercy WARNING: Your password has expired. You must change your password now and login again! Changement de mot de passe pour l'utilisateur aa. Nouveau mot de passe : Retapez le nouveau mot de passe : (Current) Password: passwd : mise à jour réussie de tous les jetons d'authentification. Connection to quercy closed.
I tried: "LANG=C ssh aa@quercy" and I get the same mess.
Is it possible to get password change dialog in english ?
On Fri, 30 Oct 2015 12:12, Philippe BOURDEU d'AGUERRE <bda@...> wrote:
When I connect through SSH to my Centos 6 box, language are mixed: connection is in english but password change dialog is in french. Example:
$ ssh aa@quercy You are required to change your password immediately (root enforced) Last login: Fri Oct 30 11:41:31 2015 from quercy WARNING: Your password has expired. You must change your password now and login again! Changement de mot de passe pour l'utilisateur aa. Nouveau mot de passe : Retapez le nouveau mot de passe : (Current) Password: passwd : mise à jour réussie de tous les jetons d'authentification. Connection to quercy closed.
I tried: "LANG=C ssh aa@quercy" and I get the same mess.
Is it possible to get password change dialog in english ?
Frist, the use of "LANG=C ssh aa@quercy" only sets the language of the lokal ssh-client.
Either you add the "SendEnv LANG" line to your ~/.ssh/config (or add [space]LANG to a existing "SendEnv" line)
or you can specify it as a option on the command line:
[code] LANG=C export LANG ssh -o "SendEnv LANG" aa@quercy [/code]
maybe "LANG=C ssh -o 'SendEnv LANG' aa@quercy" also works.
Note the 'export', in some environments LANG is not set at all, there the export is needed, else it is only set for the shell, and not for the called programs.
That way the ssh-client can tell the ssh-server on the other side what language setting you want to have.
Atm, it looks like that the "LANG" is set to "fr_FR" or similar for the whole system "quercy", or just for the user "aa" in his/her .profile / .bash_profile / .bashrc / or other shell init file.
Another possibility is that settings of LC_* Have been messed with, either local or on the machine you want to connect to.
If so, please set the "LC_ALL=C" add the "LC_ALL" to the "SendEnv" above, and be aware that the "oneliner" version will no longer work.
- Yamaban.
Thank you for you help.
I tried your tips but the problem remains. Example:
$ echo "SendEnv LANG LC_ALL" > ~/.ssh/config $ LANG=C; export LANG; LC_ALL=C; export LC_ALL $ ssh aa@quercy You are required to change your password immediately (root enforced) Last login: Fri Oct 30 15:02:34 2015 from quercy WARNING: Your password has expired. You must change your password now and login again! Changement de mot de passe pour l'utilisateur aa. Nouveau mot de passe : MOT DE PASSE INCORRECT : BEAUCOUP trop court
In article 56337B09.7080901@aime-toulouse.fr, Philippe BOURDEU d'AGUERRE bda@aime-toulouse.fr wrote:
Thank you for you help.
I tried your tips but the problem remains. Example:
$ echo "SendEnv LANG LC_ALL" > ~/.ssh/config $ LANG=C; export LANG; LC_ALL=C; export LC_ALL $ ssh aa@quercy You are required to change your password immediately (root enforced) Last login: Fri Oct 30 15:02:34 2015 from quercy WARNING: Your password has expired. You must change your password now and login again! Changement de mot de passe pour l'utilisateur aa. Nouveau mot de passe : MOT DE PASSE INCORRECT : BEAUCOUP trop court
Maybe you also need to put "AcceptEnv LANG" in /etc/ssh/sshd_config on the remote system, to tell it to honour the LANG being sent?
Cheers Tony
Le 30/10/2015 15:32, Tony Mountifield a écrit :
Maybe you also need to put "AcceptEnv LANG" in /etc/ssh/sshd_config on the remote system, to tell it to honour the LANG being sent?
That's true ! But it was already there :-(
Cheers,
If I put "export LANG=C" in /etc/sysconfig/sshd and restart sshd, all messages are in english. It seems that LANG is taken into account only when connection succeeds.
Le 30/10/2015 15:13, Philippe BOURDEU d'AGUERRE a écrit :
Thank you for you help.
I tried your tips but the problem remains. Example:
$ echo "SendEnv LANG LC_ALL" > ~/.ssh/config $ LANG=C; export LANG; LC_ALL=C; export LC_ALL $ ssh aa@quercy You are required to change your password immediately (root enforced) Last login: Fri Oct 30 15:02:34 2015 from quercy WARNING: Your password has expired. You must change your password now and login again! Changement de mot de passe pour l'utilisateur aa. Nouveau mot de passe : MOT DE PASSE INCORRECT : BEAUCOUP trop court
Philippe BOURDEU d'AGUERRE wrote:
Thank you for you help.
I tried your tips but the problem remains. Example:
$ echo "SendEnv LANG LC_ALL" > ~/.ssh/config $ LANG=C; export LANG; LC_ALL=C; export LC_ALL $ ssh aa@quercy You are required to change your password immediately (root enforced) Last login: Fri Oct 30 15:02:34 2015 from quercy WARNING: Your password has expired. You must change your password now and login again! Changement de mot de passe pour l'utilisateur aa. Nouveau mot de passe : MOT DE PASSE INCORRECT : BEAUCOUP trop court
Have you changed your password? If not, you're not really logged in, and it's not getting things like language settings from your home directory.
mark
Le 30/10/2015 16:16, m.roth@5-cent.us a écrit :
Have you changed your password? If not, you're not really logged in, and it's not getting things like language settings from your home directory.
I understand that since I am not yet connected, my settings are not taken into account. But what is odd is that some messages are in english and some others in french.
If I connect with GDM, I get same messages but they are all in french which is default language of my box.