Testing method in man page does not work
Brought to you by:
tyranny
At least on my PCs with sh, the testing method outlined
in the manpage:
# echo -e "username\0password\0timestamp\0" \
| checkpassword-pam -s SERVICE \
--debug --stdout -- /usr/bin/id 3<&0
does not work. The reason it does not work is that \0
followed by any numbers (like a timestamp) is
interpreted by echo as an octal character.
I fixed this by replacing all instances of \0 with
\0000 in the above example.
Logged In: NO
This test worked for me, following the above suggestion. The password is "4estpass" and the test fails without the \0000 before the password.
echo -e "testuser\00004estpass\0timestamp\0" \
| checkpassword-pam -s sshd \
--debug --stdout -- /usr/bin/id 3<&0
FYI On my system (opensuse 10.0) sshd is a file in /etc/pam.d