Fix checking password from /etc/passwd and /etc/shadow

Michael Steffens michael.steffens at
Thu Sep 25 01:12:27 EST 2003

Krzysztof Oledzki wrote:
> Hello,
> This patch fix order of checking password in systems that contains
> /etc/shadow file (Linux for example). The order is exactly like in
> linux-shadow-password package. First is checked /etc/passwd but if
> password field contains "x" then password is read from /etc/shadow
> instead.

What is wrong with the current approach of first checking /etc/shadow
using getspnam, falling back to /etc/passwd if the first didn't return

Reversing that order and making the decision depend on a non-zero
value returned from /etc/passwd ("x", "*", whatever?) looks like
making it more complicated to me.


More information about the openssh-unix-dev mailing list