openldap – ldap_add:协议错误(2)附加信息:未提供任何属性

前端之家收集整理的这篇文章主要介绍了openldap – ldap_add:协议错误(2)附加信息:未提供任何属性前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在关注 this guide将RHEL6计算机上的/ etc / passwd和/ etc / group中的现有用户迁移到新的外部OpenLDAP服务器.

我正在尝试应用此文件

  1. # cat people_group.ldif
  2. dn: ou=People,dc=my_domain,dc=com
  3. ou: People
  4. objectclass: organizationalUnit
  5.  
  6. dn: ou=Group,dc=com
  7. ou: Group
  8. objectclass: organizationalUnit

我收到此错误

  1. # ldapadd -x -W -D "cn=admin,dc=com" -H ldaps://my_hostname.my_domain.com -f people_group.ldif
  2. Enter LDAP Password:
  3. adding new entry "ou=People,dc=com ou: People objectclass: organizationalUnit"
  4. ldap_add: Protocol error (2)
  5. additional info: no attributes provided

如果我跳过这个文件并去添加下一个文件,我会得到一个不同的错误

  1. # ldapadd -x -W -D "cn=admin,dc=com" -H ldaps://my_hostname.my_domain.com -f group.ldif
  2. Enter LDAP Password:
  3. adding new entry "cn=some_group,ou=Group,dc=com"
  4. ldap_add: No such object (32)

我猜它找不到ou = Group,它必须由第一个给出错误的命令创建.是对的吗?

这是group.ldif中的第一个条目:

  1. dn: cn=some_group,dc=com
  2. objectClass: posixGroup
  3. objectClass: top
  4. cn: my_domain
  5. userPassword: {crypt}x
  6. gidNumber: 500

这是实际OpenLDAP服务器上ldapsearch的输出

  1. # ldapsearch -H ldapi:/// -Y EXTERNAL
  2. SASL/EXTERNAL authentication started
  3. SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
  4. SASL SSF: 0
  5. # extended LDIF
  6. #
  7. # LDAPv3
  8. # base <dc=my_domain,dc=com> (default) with scope subtree
  9. # filter: (objectclass=*)
  10. # requesting: ALL
  11. #
  12.  
  13. # search result
  14. search: 2
  15. result: 32 No such object
  16.  
  17. # numResponses: 1

以下是运行第一个命令的其他诊断信息:

  1. # ldapadd -x -W -D "cn=admin,dc=com" -H ldaps://my_hostname.my_domain.com -f people_group.ldif -d1
  2. ldap_url_parse_ext(ldaps://my_hostname.my_domain.com)
  3. ldap_create
  4. ldap_url_parse_ext(ldaps://my_hostname.my_domain.com:636/??base)
  5. Enter LDAP Password:
  6. ldap_sasl_bind
  7. ldap_send_initial_request
  8. ldap_new_connection 1 1 0
  9. ldap_int_open_connection
  10. ldap_connect_to_host: TCP my_hostname.my_domain.com:636
  11. ldap_new_socket: 4
  12. ldap_prepare_socket: 4
  13. ldap_connect_to_host: Trying 10.25.223.184:636
  14. ldap_pvt_connect: fd: 4 tm: -1 async: 0
  15. attempting to connect:
  16. connect success
  17. TLS: certdb config: configDir='/etc/pki/tls/certs' tokenDescription='ldap(0)' certPrefix='' keyPrefix='' flags=readOnly
  18. TLS: cannot open certdb '/etc/pki/tls/certs',error -8018:Unknown PKCS #11 error.
  19. TLS: loaded CA certificate file /etc/pki/ca-trust/source/anchors/digicert.intermediate.crt.
  20. TLS: skipping 'renew-dummy-cert' - filename does not have expected format (certificate hash with numeric suffix)
  21. TLS: skipping 'ca-bundle.crt' - filename does not have expected format (certificate hash with numeric suffix)
  22. TLS: skipping 'make-dummy-cert' - filename does not have expected format (certificate hash with numeric suffix)
  23. TLS: skipping 'Makefile' - filename does not have expected format (certificate hash with numeric suffix)
  24. TLS: skipping 'ca-bundle.trust.crt' - filename does not have expected format (certificate hash with numeric suffix)
  25. TLS: certificate [CN=my_hostname.my_domain.com] is not valid - CA cert is not valid
  26. TLS: certificate [CN=my_hostname.my_domain.com] is not valid - error -8172:Peer's certificate issuer has been marked as not trusted by the user..
  27. TLS certificate verification: subject: CN=my_hostname.my_domain.com,issuer: CN=my_hostname.my_domain.com,cipher: AES-256,security level: high,secret key bits: 256,total key bits: 256,cache hits: 0,cache misses: 0,cache not reusable: 0
  28. ldap_open_defconn: successful
  29. ldap_send_server_request
  30. ber_scanf fmt ({it) ber:
  31. ber_scanf fmt ({i) ber:
  32. ber_flush2: 50 bytes to sd 4
  33. ldap_result ld 0x2008420 msgid 1
  34. wait4msg ld 0x2008420 msgid 1 (infinite timeout)
  35. wait4msg continue ld 0x2008420 msgid 1 all 1
  36. ** ld 0x2008420 Connections:
  37. * host: my_hostname.my_domain.com port: 636 (default)
  38. refcnt: 2 status: Connected
  39. last used: Thu Nov 5 16:47:00 2015
  40.  
  41.  
  42. ** ld 0x2008420 Outstanding Requests:
  43. * msgid 1,origid 1,status InProgress
  44. outstanding referrals 0,parent count 0
  45. ld 0x2008420 request count 1 (abandoned 0)
  46. ** ld 0x2008420 Response Queue:
  47. Empty
  48. ld 0x2008420 response count 0
  49. ldap_chkResponseList ld 0x2008420 msgid 1 all 1
  50. ldap_chkResponseList returns ld 0x2008420 NULL
  51. ldap_int_select
  52. read1msg: ld 0x2008420 msgid 1 all 1
  53. ber_get_next
  54. ber_get_next: tag 0x30 len 12 contents:
  55. read1msg: ld 0x2008420 msgid 1 message type bind
  56. ber_scanf fmt ({eAA) ber:
  57. read1msg: ld 0x2008420 0 new referrals
  58. read1msg: mark request completed,ld 0x2008420 msgid 1
  59. request done: ld 0x2008420 msgid 1
  60. res_errno: 0,res_error: <>,res_matched: <>
  61. ldap_free_request (origid 1,msgid 1)
  62. ldap_parse_result
  63. ber_scanf fmt ({iAA) ber:
  64. ber_scanf fmt (}) ber:
  65. ldap_msgfree
  66. adding new entry "ou=People,dc=com ou: People objectclass: organizationalUnit"
  67. ldap_add_ext
  68. ldap_send_initial_request
  69. ldap_send_server_request
  70. ber_scanf fmt ({it) ber:
  71. ber_scanf fmt ({) ber:
  72. ber_flush2: 87 bytes to sd 4
  73. ldap_result ld 0x2008420 msgid 2
  74. wait4msg ld 0x2008420 msgid 2 (timeout 100000 usec)
  75. wait4msg continue ld 0x2008420 msgid 2 all 1
  76. ** ld 0x2008420 Connections:
  77. * host: my_hostname.my_domain.com port: 636 (default)
  78. refcnt: 2 status: Connected
  79. last used: Thu Nov 5 16:47:00 2015
  80.  
  81.  
  82. ** ld 0x2008420 Outstanding Requests:
  83. * msgid 2,origid 2,parent count 0
  84. ld 0x2008420 request count 1 (abandoned 0)
  85. ** ld 0x2008420 Response Queue:
  86. Empty
  87. ld 0x2008420 response count 0
  88. ldap_chkResponseList ld 0x2008420 msgid 2 all 1
  89. ldap_chkResponseList returns ld 0x2008420 NULL
  90. ldap_int_select
  91. read1msg: ld 0x2008420 msgid 2 all 1
  92. ber_get_next
  93. ber_get_next: tag 0x30 len 34 contents:
  94. read1msg: ld 0x2008420 msgid 2 message type add
  95. ber_scanf fmt ({eAA) ber:
  96. read1msg: ld 0x2008420 0 new referrals
  97. read1msg: mark request completed,ld 0x2008420 msgid 2
  98. request done: ld 0x2008420 msgid 2
  99. res_errno: 2,res_error: <no attributes provided>,res_matched: <>
  100. ldap_free_request (origid 2,msgid 2)
  101. ldap_parse_result
  102. ber_scanf fmt ({iAA) ber:
  103. ber_scanf fmt (}) ber:
  104. ldap_msgfree
  105. ldap_err2string
  106. ldap_add: Protocol error (2)
  107. additional info: no attributes provided
  108.  
  109. ldap_free_connection 1 1
  110. ldap_send_unbind
  111. ber_flush2: 7 bytes to sd 4
  112. ldap_free_connection: actually freed

ldapadd想要什么属性

如何通过其他信息:没有提供属性错误

在ldif语法中,前导空格是换行标记.您正在尝试添加一个ou = People,dc = my_domain,dc = com ou:人员对象类:没有属性的organizationalUnit.
  1. dn: ou=People,dc=com
  2. ou: People
  3. objectclass: organizationalUnit
  4.  
  5. dn: ou=Group,dc=com
  6. ou: Group
  7. objectclass: organizationalUnit

猜你在找的Bash相关文章