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 "mail=postmaster@westos.org, virtualDomain=westos.org, o=extmailAccount, dc=westos.org"
adding new entry "mailLocalAddress=support@westos.org, o=extmailAlias, dc=westos.org"
adding new entry "mail=root@westos.org, o=extmailManager, dc=westos.org"
转载于:https://blog.51cto.com/bibiyang/847679