在Docker容器中的OpenIDap 2.4
我在docker集装箱内设置了一个openldap服务器(slapd),我只带了最新的centos镜像(标签:latest,centos7,7, image here
然后我安装了以下软件包:
- OpenLDAP的的服务器,2.4.44-5.el7.x86_64
- OpenLDAP的-2.4.44-5.el7.x86_64
- OpenLDAP的客户机 – 2.4.44-5.el7.x86_64
- OpenLDAP的-devel的-2.4.44-5.el7.x86_64
然后用/usr/sbin/slapd -F /etc/openldap/slapd.d/
启动服务
然后我试图添加域和root用户到ldapconfiguration使用这个ldif文件(db.ldif)
dn: olcDatabase={2}hdb,cn=config changetype: modify replace: olcSuffix olcSuffix: dc=mydomain,dc=com dn: olcDatabase={2}hdb,cn=config changetype: modify replace: olcRootDN olcRootDN: cn=myadminuser,dc=mydomain,dc=com dn: olcDatabase={2}hdb,cn=config changetype: modify replace: olcRootPW olcRootPW: {SSHA}blablablabla
然后当我运行ldapmodify -Y EXTERNAL -H ldapi:/// -f db.ldif
它引发了这个ldap_sasl_interactive_bind_s: Can't contact LDAP server (-1)
我看到端口是开放的,因为telnet可以连接到它,实际上从另一台机器上做ldapsearch工作ldapsearch -h $myserver -p $myport -x
并回应这个:
# extended LDIF # # LDAPv3 # base <> (default) with scope subtree # filter: (objectclass=*) # requesting: ALL # # search result search: 2 result: 32 No such object # numResponses: 1
我真的不知道我错过了什么。