ldapadd出现ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)

ldapadd -W -x -D "cn=manager,dc=westos.org" -f init.ldif
Enter LDAP Password:
ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)

出现这个错误的时候,查看服务和端口都已经开启了,需要你手动指定主机名和你的端口号(ldap端口号为389)

[root@desktop88 docs]# ldapadd -W -x -D "cn=manager,dc=westos.org" -f init.ldif -h desktop88.example.com -
p 389
Enter LDAP Password:
adding new entry "dc=westos.org"
adding new entry "cn=Manager,dc=westos.org"
adding new entry "o=extmailAccount,dc=westos.org"
adding new entry "o=extmailAlias,dc=westos.org"
adding new entry "o=extmailManager,dc=westos.org"
adding new entry "virtualDomain=westos.org, o=extmailAccount, dc=westos.org"
adding new entry "[email protected], virtualDomain=westos.org, o=extmailAccount, dc=westos.org"
adding new entry "[email protected], o=extmailAlias, dc=westos.org"
adding new entry "[email protected], o=extmailManager, dc=westos.org"

你可能感兴趣的:(server,LDAP,contact,Can't,(-1))