[sisyphus] OpenLDAP

Epiphanov Sergei =?iso-8859-1?q?serpiph_=CE=C1_nikiet=2Eru?=
Вт Янв 25 14:00:24 MSK 2005


Пытаюсь в очередной раз SASL подружить с OpenLDAP но безуспешно.
Вот кусок лога подключения (на клиенте команда ldapwhoami -U test -W):

Jan 25 13:11:36 comp slapd[32125]: conn=0 fd=12 ACCEPT from IP=193.125.101.100:33013 (IP=193.125.101.100:389)
Jan 25 13:11:36 comp slapd[32125]: daemon: added 12r
Jan 25 13:11:36 comp slapd[32125]: daemon: activity on:
Jan 25 13:11:36 comp slapd[32125]:
Jan 25 13:11:36 comp slapd[32125]: daemon: select: listen=6 active_threads=0 tvp=NULL
Jan 25 13:11:36 comp slapd[32125]: daemon: select: listen=7 active_threads=0 tvp=NULL
Jan 25 13:11:36 comp slapd[32125]: daemon: activity on 1 descriptors
Jan 25 13:11:36 comp slapd[32125]: daemon: activity on:
Jan 25 13:11:36 comp slapd[32125]:  12r
Jan 25 13:11:36 comp slapd[32125]:
Jan 25 13:11:36 comp slapd[32125]: daemon: read activity on 12
Jan 25 13:11:36 comp slapd[32125]: connection_get(12)
Jan 25 13:11:36 comp slapd[32125]: connection_get(12): got connid=0
Jan 25 13:11:36 comp slapd[32125]: connection_read(12): checking for input on id=0
Jan 25 13:11:36 comp slapd[32125]: ber_get_next on fd 12 failed errno=11 (Resource temporarily unavailable)
                    ^^^^^^^^^^^^^^^^^^^^^ - вот эта строка непонятна.
Jan 25 13:11:36 comp slapd[32172]: do_search
Jan 25 13:11:36 comp slapd[32172]: >>> dnPrettyNormal: <>
Jan 25 13:11:36 comp slapd[32172]: <<< dnPrettyNormal: <>, <>
Jan 25 13:11:36 comp slapd[32172]: SRCH "" 0 0
Jan 25 13:11:36 comp slapd[32125]: daemon: select: listen=6 active_threads=0 tvp=NULL
Jan 25 13:11:36 comp slapd[32172]:     0 0 0
Jan 25 13:11:36 comp slapd[32125]: daemon: select: listen=7 active_threads=0 tvp=NULL
Jan 25 13:11:36 comp slapd[32172]: begin get_filter
Jan 25 13:11:36 comp slapd[32172]: PRESENT
Jan 25 13:11:36 comp slapd[32172]: end get_filter 0
Jan 25 13:11:36 comp slapd[32172]:     filter: (objectClass=*)
Jan 25 13:11:36 comp slapd[32172]:     attrs:
Jan 25 13:11:36 comp slapd[32172]:  supportedSASLMechanisms
Jan 25 13:11:36 comp slapd[32172]:
Jan 25 13:11:36 comp slapd[32172]: conn=0 op=0 SRCH base="" scope=0 deref=0 filter="(objectClass=*)"
Jan 25 13:11:36 comp slapd[32172]: conn=0 op=0 SRCH attr=supportedSASLMechanisms
Jan 25 13:11:36 comp slapd[32172]: => test_filter
Jan 25 13:11:36 comp slapd[32172]:     PRESENT
Jan 25 13:11:36 comp slapd[32172]: => access_allowed: search access to "" "objectClass" requested
Jan 25 13:11:36 comp slapd[32172]: => acl_get: [2] attr objectClass
Jan 25 13:11:36 comp slapd[32172]: => acl_mask: access to entry "", attr "objectClass" requested
Jan 25 13:11:36 comp slapd[32172]: => acl_mask: to all values by "", (=n)
Jan 25 13:11:36 comp slapd[32172]: <= check a_dn_pat: *
Jan 25 13:11:36 comp slapd[32172]: <= acl_mask: [1] applying read(=rscx) (stop)
Jan 25 13:11:36 comp slapd[32172]: <= acl_mask: [1] mask: read(=rscx)
Jan 25 13:11:36 comp slapd[32172]: => access_allowed: search access granted by read(=rscx)
Jan 25 13:11:36 comp slapd[32172]: <= test_filter 6
Jan 25 13:11:36 comp slapd[32172]: => send_search_entry: dn=""
Jan 25 13:11:36 comp slapd[32172]: => access_allowed: read access to "" "entry" requested
Jan 25 13:11:36 comp slapd[32172]: => acl_get: [2] attr entry
Jan 25 13:11:36 comp slapd[32172]: => acl_mask: access to entry "", attr "entry" requested
Jan 25 13:11:36 comp slapd[32172]: => acl_mask: to all values by "", (=n)
Jan 25 13:11:36 comp slapd[32172]: <= check a_dn_pat: *
Jan 25 13:11:36 comp slapd[32172]: <= acl_mask: [1] applying read(=rscx) (stop)
Jan 25 13:11:36 comp slapd[32172]: <= acl_mask: [1] mask: read(=rscx)
Jan 25 13:11:36 comp slapd[32172]: => access_allowed: read access granted by read(=rscx)
Jan 25 13:11:36 comp slapd[32172]: conn=0 op=0 ENTRY dn=""
Jan 25 13:11:36 comp slapd[32172]: <= send_search_entry
Jan 25 13:11:36 comp slapd[32172]: send_ldap_result: conn=0 op=0 p=3
Jan 25 13:11:36 comp slapd[32172]: send_ldap_result: err=0 matched="" text=""
Jan 25 13:11:36 comp slapd[32172]: send_ldap_response: msgid=1 tag=101 err=0
Jan 25 13:11:36 comp slapd[32172]: conn=0 op=0 SEARCH RESULT tag=101 err=0 nentries=1 text=
Jan 25 13:11:36 comp slapd[32125]: daemon: activity on 1 descriptors
Jan 25 13:11:36 comp slapd[32125]: daemon: activity on:
Jan 25 13:11:36 comp slapd[32125]:  12r
Jan 25 13:11:36 comp slapd[32125]:
Jan 25 13:11:36 comp slapd[32125]: daemon: read activity on 12
Jan 25 13:11:36 comp slapd[32125]: connection_get(12)
Jan 25 13:11:36 comp slapd[32125]: connection_get(12): got connid=0
Jan 25 13:11:36 comp slapd[32125]: connection_read(12): checking for input on id=0
Jan 25 13:11:36 comp slapd[32125]: ber_get_next on fd 12 failed errno=0 (Success)
Jan 25 13:11:36 comp slapd[32125]: connection_read(12): input error=-2 id=0, closing.
Jan 25 13:11:36 comp slapd[32125]: connection_closing: readying conn=0 sd=12 for close
Jan 25 13:11:36 comp slapd[32125]: connection_close: deferring conn=0 sd=12
Jan 25 13:11:36 comp slapd[32125]: daemon: select: listen=6 active_threads=0 tvp=NULL
Jan 25 13:11:36 comp slapd[32125]: daemon: select: listen=7 active_threads=0 tvp=NULL
Jan 25 13:11:36 comp slapd[32125]: daemon: activity on 1 descriptors
Jan 25 13:11:36 comp slapd[32125]: daemon: select: listen=6 active_threads=0 tvp=NULL
Jan 25 13:11:36 comp slapd[32125]: daemon: select: listen=7 active_threads=0 tvp=NULL
Jan 25 13:11:36 comp slapd[32172]: connection_resched: attempting closing conn=0 sd=12
Jan 25 13:11:36 comp slapd[32172]: connection_close: conn=0 sd=12
Jan 25 13:11:36 comp slapd[32172]: daemon: removing 12
Jan 25 13:11:36 comp slapd[32172]: conn=0 fd=12 closed

При этом простая авторизация проходит. Версия 2.2.20-alt1.
Сизиф недельной давности. Строки sasl-regexp прописал как
показано в инструкции, прописал хранить пароли в ldap
в открытом виде. Где может быть засада?

Настройки saslauthd сделал (навёл на свой тестовый сервер):
ldap_servers: ldap://193.125.101.100/ ldaps://193.125.101.100/
ldap_bind_dn: cn=sasl,ou=operator,dc=otdel,dc=rabota,dc=ru
ldap_bind_pw: {CLEARTEXT}test
...

проверил существование cn=sasl,ou=operator,dc=otdel,dc=rabota,dc=ru

Может, это связано с настройками в /usr/lib/sasl2? Нужен ли для slapd
сервер saslauthd?

-- 
С уважением, Епифанов Сергей



Подробная информация о списке рассылки Sisyphus