当我尝试使用 ldapadd 添加用户时,失败并显示以下信息。

当我尝试使用 ldapadd 添加用户时,失败并显示以下信息。

使用以下配置,我无法将 POSIX 用户/组添加到 LDAP 服务器。

如果有人可以告诉我在这种情况下 dc 的重要性,它是我在创建证书时提到的 FQDN 还是其他什么。

cat add-users.ldif
# Entry 1: cn=ldap-qa-group,ou=Groups,dc=qa-ldap.sjlab1.ixsystems,dc=com
dn: cn=ldap-qa-group,ou=Groups,dc=qa-ldap.sjlab1.ixsystems,dc=com
cn: ldap-qa-group
gidnumber: 501
memberuid: vchauhan
objectclass: posixGroup
objectclass: top

# Entry 1: cn=vaibhav chauhan,dc=qa-ldap.sjlab1.ixsystems,dc=com
dn: cn=vaibhav chauhan,dc=qa-ldap.sjlab1.ixsystems,dc=com
cn: vaibhav chauhan
gidnumber: 500
givenname: vaibhav
homedirectory: /home/users/vchauhan
loginshell: /bin/sh
objectclass: inetOrgPerson
objectclass: posixAccount
objectclass: top
sn: chauhan
uid: vchauhan
uidnumber: 1000
userpassword: {crypt}x

当我尝试使用 ldapadd 添加用户时,失败并显示以下信息。

ldapadd -d 1 -h qa-ldap.sjlab1.ixsystems.com -p 389 -D cn=qa-ldap.sjlab1.ixsystems.com -f add-user.ldif -W
ldap_create
ldap_url_parse_ext(ldap://qa-ldap.sjlab1.ixsystems.com:389)
Enter LDAP Password: 
ldap_sasl_bind
ldap_send_initial_request
ldap_new_connection 1 1 0
ldap_int_open_connection
ldap_connect_to_host: TCP qa-ldap.sjlab1.ixsystems.com:389
ldap_new_socket: 4
ldap_prepare_socket: 4
ldap_connect_to_host: Trying 10.5.126.21:389
ldap_pvt_connect: fd: 4 tm: -1 async: 0
attempting to connect: 
connect success
ldap_open_defconn: successful
ldap_send_server_request
ber_scanf fmt ({it) ber:
ber_scanf fmt ({i) ber:
ber_flush2: 54 bytes to sd 4
ldap_result ld 0x80188f070 msgid 1
wait4msg ld 0x80188f070 msgid 1 (infinite timeout)
wait4msg continue ld 0x80188f070 msgid 1 all 1
** ld 0x80188f070 Connections:
* host: qa-ldap.sjlab1.ixsystems.com  port: 389  (default)
  refcnt: 2  status: Connected
  last used: Thu Sep  3 10:18:27 2015


** ld 0x80188f070 Outstanding Requests:
 * msgid 1,  origid 1, status InProgress
   outstanding referrals 0, parent count 0
  ld 0x80188f070 request count 1 (abandoned 0)
** ld 0x80188f070 Response Queue:
   Empty
  ld 0x80188f070 response count 0
ldap_chkResponseList ld 0x80188f070 msgid 1 all 1
ldap_chkResponseList returns ld 0x80188f070 NULL
ldap_int_select
read1msg: ld 0x80188f070 msgid 1 all 1
ber_get_next
ber_get_next: tag 0x30 len 12 contents:
read1msg: ld 0x80188f070 msgid 1 message type bind
ber_scanf fmt ({eAA) ber:
read1msg: ld 0x80188f070 0 new referrals
read1msg:  mark request completed, ld 0x80188f070 msgid 1
request done: ld 0x80188f070 msgid 1
res_errno: 49, res_error: <>, res_matched: <>
ldap_free_request (origid 1, msgid 1)
ldap_parse_result
ber_scanf fmt ({iAA) ber:
ber_scanf fmt (}) ber:
ldap_msgfree
ldap_err2string
ldap_bind: Invalid credentials (49)
ldap_free_connection 1 1
ldap_send_unbind
ber_flush2: 7 bytes to sd 4
ldap_free_connection: actually freed

相关内容