PAM LDAP: passwd 명령에 "(현재) LDAP 비밀번호:"가 필요한 이유는 무엇입니까?

PAM LDAP: passwd 명령에 "(현재) LDAP 비밀번호:"가 필요한 이유는 무엇입니까?

Debian 11 서버에 openLDAP 서비스가 있고 Ubuntu 22.04 PC에 PAM이 설정되어 있는데 혼란스러워지기 시작했습니다. 아무 문제 없이 로그인할 수 있지만 비밀번호를 변경하려고 하면 이상한 동작이 나타납니다. 처음에는 비밀번호를 변경할 수 있었는데, 먼저 비밀번호를 입력해야 하고 LDAP Password, 그 다음에는 새 비밀번호를 두 번 입력하고 다시 입력하라는 메시지가 표시됩니다.

그러나 이제 약간의 조작 후에는 다음 /etc/pam.d/common-password과 같이 보입니다.

#
# /etc/pam.d/common-password - password-related modules common to all services
#
# This file is included from other service-specific PAM config files,
# and should contain a list of modules that define the services to be
# used to change user passwords.  The default is pam_unix.

# Explanation of pam_unix options:
# The "yescrypt" option enables
#hashed passwords using the yescrypt algorithm, introduced in Debian
#11.  Without this option, the default is Unix crypt.  Prior releases
#used the option "sha512"; if a shadow password hash will be shared
#between Debian 11 and older releases replace "yescrypt" with "sha512"
#for compatibility .  The "obscure" option replaces the old
#`OBSCURE_CHECKS_ENAB' option in login.defs.  See the pam_unix manpage
#for other options.

# As of pam 1.0.1-6, this file is managed by pam-auth-update by default.
# To take advantage of this, it is recommended that you configure any
# local modules either before or after the default block, and use
# pam-auth-update to manage selection of other modules.  See
# pam-auth-update(8) for details.

# here are the per-package modules (the "Primary" block)
#password requisite     pam_pwquality.so retry=3
#password [success=2 default=ignore]  pam_unix.so obscure use_authtok try_first_pass yescrypt
password  [success=2 default=ignore]  pam_unix.so obscure try_first_pass yescrypt debug
#password sufficient      pam_sss.so use_authtok
password  [success=1 default=ignore]  pam_ldap.so minimum_uid=1000 use_authtok debug
# here's the fallback if no module succeeds
password  requisite     pam_deny.so
# prime the stack with a positive return value if there isn't one already;
# this avoids us returning an error just because nothing sets a success code
# since the modules above will each just jump around
password  required      pam_permit.so
# and here are more per-package modules (the "Additional" block)
password  optional  pam_gnome_keyring.so
# end of pam-auth-update config

비밀번호를 변경하려고 할 때 다음을 보았습니다.

(base) jan@enki:~$ passwd
(current) LDAP Password: 
passwd: Authentication token manipulation error
passwd: password unchanged

이것은 다음과 같습니다 /var/log/auth.log(다른 터미널을 시작한 후 Enter를 여러 번 눌렀기 때문에 출력에 빈 줄이 표시되었습니다 passwd).

(base) root@enki:/var/log# tail -f auth.log
...
Jan 27 16:12:59 enki passwd[392340]: pam_unix(passwd:chauthtok): username [jan] obtained
Jan 27 16:12:59 enki passwd[392340]: pam_unix(passwd:chauthtok): user "jan" does not exist in /etc/passwd
Jan 27 16:12:59 enki passwd[392340]: pam_ldap(passwd:chauthtok): nslcd request config (1)
Jan 27 16:12:59 enki passwd[392340]: pam_ldap(passwd:chauthtok): nslcd account check; user=jan


Jan 27 16:13:05 enki passwd[392340]: pam_ldap(passwd:chauthtok): nslcd authentication; user=jan
Jan 27 16:13:05 enki passwd[392340]: pam_ldap(passwd:chauthtok): authentication succeeded
Jan 27 16:13:05 enki passwd[392340]: pam_unix(passwd:chauthtok): username [jan] obtained
Jan 27 16:13:05 enki passwd[392340]: pam_unix(passwd:chauthtok): user "jan" does not exist in /etc/passwd
Jan 27 16:13:05 enki passwd[392340]: pam_ldap(passwd:chauthtok): nslcd request config (1)
Jan 27 16:13:05 enki passwd[392340]: pam_ldap(passwd:chauthtok): nslcd account check; user=jan
...

pam_ldap인증이 성공한 것 같은데 왜 실패하는 걸까요? 둘째, 새 비밀번호를 두 번 묻는 이유는 무엇입니까?

관련 정보