LDAP に登録されているユーザのパスワードを変更しようとすると、エラーになってしまう。
$ passwd Changing password for alice. Enter login(LDAP) password: Unable to change auth token: authentication error $
openldap authentication on netbsd によれば、
/etc/pam.d/system
(略)
# password
password sufficient pam_ldap.so
password sufficient pam_krb5.so try_first_pass
password sufficient pam_unix.so try_first_pass
password required pam_deny.so prelim_ignoreThe last bit here with pam_deny, is a bit special, it is what enables you to change passwords for both local users and those in the ldap database with the passwd command. pam_deny with the prelim_ignore flag is needed, else pam will will fail in the preliminary phase (it is always run trough twice) and you will not be able to change passwords.
ということで、/etc/pam.d/system の password の pam_unix.so を sufficient に変更し、最後に pam_deny.so を required で追加、オプションを prelim_ignore にするらしい。
prelim_ignore?
続きを読むと、pam_deny.c にパッチをあてて pam_deny.so を作り直せと書いてある。ドキュメントは少し古いのだが、今でもその対応しかないのだろうか。
Google で検索したが最近の事情はわからずじまい。