Eu estou tentando configurar a autenticação pam usando o ldap do Debian jessy para um servidor SLES11 sem sucesso. Eu sempre recebo um retorno de credenciais erradas, embora ele possa vincular com sucesso o uso de ldapsearch
. A seguir estão as saídas de log do ldap para os casos que realizo:
ldapsearch -D uid=testuser,ou=people,dc=our-domain,dc=de -W -H ldap://192.168.100.11 'uid=testuser'
slapd[4628]: conn=1072 fd=18 ACCEPT from IP=192.168.100.12:59539 (IP=0.0.0.0:389)
slapd[4628]: conn=1072 op=0 BIND dn="uid=testuser,ou=people,dc=our-domain,dc=de" method=128
slapd[4628]: conn=1072 op=0 BIND dn="uid=testuser,ou=people,dc=our-domain,dc=de" mech=SIMPLE ssf=0
slapd[4628]: conn=1072 op=0 RESULT tag=97 err=0 text=
slapd[4628]: conn=1072 op=1 SRCH base="ou=people,dc=our-domain,dc=de" scope=2 deref=0 filter="(uid=testuser)"
slapd[4628]: conn=1072 op=1 SEARCH RESULT tag=101 err=0 nentries=1 text=
slapd[4628]: conn=1072 op=2 UNBIND
slapd[4628]: conn=1072 fd=18 closed
Tentativa de login usando o seguinte /etc/pam_ldap.conf
:
host 192.168.100.11
base ou=people,dc=our-domain,dc=de
ldap_version 3
Resultados em
slapd[4628]: conn=1073 fd=18 ACCEPT from IP=192.168.100.12:59540 (IP=0.0.0.0:389)
slapd[4628]: conn=1073 op=0 BIND dn="" method=128
slapd[4628]: conn=1073 op=0 RESULT tag=97 err=0 text=
slapd[4628]: conn=1073 op=1 SRCH base="ou=people,dc=our-domain,dc=de" scope=2 deref=0 filter="(uid=testuser)"
slapd[4628]: conn=1073 op=1 SEARCH RESULT tag=101 err=0 nentries=1 text=
slapd[4628]: conn=1073 op=2 BIND dn="uid=testuser,ou=people,dc=our-domain,dc=de" method=128
slapd[4628]: conn=1073 op=2 RESULT tag=97 err=49 text=
slapd[4628]: conn=1073 op=3 BIND dn="" method=128
slapd[4628]: conn=1073 op=3 RESULT tag=97 err=0 text=
slapd[4628]: conn=1073 op=4 BIND dn="uid=testuser,ou=people,dc=our-domain,dc=de" method=128
slapd[4628]: conn=1073 op=4 RESULT tag=97 err=49 text=
slapd[4628]: conn=1073 op=5 BIND dn="" method=128
slapd[4628]: conn=1073 op=5 RESULT tag=97 err=0 text=
slapd[4628]: conn=1073 op=6 UNBIND
slapd[4628]: conn=1073 fd=18 closed
E a tentativa de login usando o seguinte /etc/pam_ldap.conf
:
host 192.168.100.11
base ou=people,dc=our-domain,dc=de
ldap_version 3
rootbinddn cn=adminaccount,ou=daemonadmins,dc=our-domain,dc=de
Resultados em
slapd[4628]: conn=1076 fd=18 ACCEPT from IP=192.168.100.12:59543 (IP=0.0.0.0:389)
slapd[4628]: conn=1076 op=0 BIND dn="cn=adminaccount,ou=daemonadmins,dc=our-domain,dc=de" method=128
slapd[4628]: conn=1076 op=0 BIND dn="cn=adminaccount,ou=daemonadmins,dc=our-domain,dc=de" mech=SIMPLE ssf=0
slapd[4628]: conn=1076 op=0 RESULT tag=97 err=0 text=
slapd[4628]: conn=1076 op=1 SRCH base="ou=people,dc=our-domain,dc=de" scope=2 deref=0 filter="(uid=testuser)"
slapd[4628]: conn=1076 op=1 SEARCH RESULT tag=101 err=0 nentries=1 text=
slapd[4628]: conn=1076 op=2 BIND anonymous mech=implicit ssf=0
slapd[4628]: conn=1076 op=2 BIND dn="uid=testuser,ou=people,dc=our-domain,dc=de" method=128
slapd[4628]: conn=1076 op=2 RESULT tag=97 err=49 text=
slapd[4628]: conn=1076 op=3 BIND dn="cn=adminaccount,ou=daemonadmins,dc=our-domain,dc=de" method=128
slapd[4628]: conn=1076 op=3 BIND dn="cn=adminaccount,ou=daemonadmins,dc=our-domain,dc=de" mech=SIMPLE ssf=0
slapd[4628]: conn=1076 op=3 RESULT tag=97 err=0 text=
slapd[4628]: conn=1076 op=4 BIND anonymous mech=implicit ssf=0
slapd[4628]: conn=1076 op=4 BIND dn="uid=testuser,ou=people,dc=our-domain,dc=de" method=128
slapd[4628]: conn=1076 op=4 RESULT tag=97 err=49 text=
slapd[4628]: conn=1076 op=5 BIND dn="cn=adminaccount,ou=daemonadmins,dc=our-domain,dc=de" method=128
slapd[4628]: conn=1076 op=5 BIND dn="cn=adminaccount,ou=daemonadmins,dc=our-domain,dc=de" mech=SIMPLE ssf=0
slapd[4628]: conn=1076 op=5 RESULT tag=97 err=0 text=
slapd[4628]: conn=1076 op=6 UNBIND
slapd[4628]: conn=1076 fd=18 closed
Para mim, parece que a senha está errada, já que a pesquisa encontra a entrada. Eu também tentei configurações diferentes para a entrada pam_password
em /etc/pam_ldap.conf
sem nenhuma alteração visível.
Existe alguma diferença em como PAM
envia a senha para o servidor LDAP em comparação com ldapsearch
?