I use OpenSSH 3.8.1p1 on AIX 5.2 ML05. (compiled from source, not
IBM's package). On one of my hosts users use it solely for password

Default user shell is /usr/bin/passwd. After one logs in, environment
is set per user (/etc/security/environ, ~/.ssh/environment) LANG is
set to pl_PL

passwd is "aware" of the environment and system talks to user in
Polish. That's what I want.

Problem occurres when password expires. User is forced to change
password. From now on passwd talks in system's default $LANG, which
is English.

I've found the cause of such behavior in session.c

Function do_child() invokes do_pwchange() at the beginning, before
everything else. (4.0p1 session.c line 1445)

Environment is read later by do_setup_env() - when setting $SHELL
(line 1496)

When /usr/bin/passwd is executed by do_pwchange() it doesn't know
environment and uses default from /etc/environment.

The solution is to read user environment before forcing password

Is this appropriate place for asking for a fix ?

PS. I know there's IBM's OpenSSH port with NLS patches.
Unfortunately it's old :|

I'm not subscribed to the list so please CC me when replaying.

Piotr Kapczuk
__________________________________________________ _______
"Decisions are good, but good decisions are better."

openssh-unix-dev mailing list