SRD

slapd

SRD
Nov 6th, 2015
348
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.16 KB | None | 0 0
  1. 1) Removed all files in /var/lib/openldap-data with exception of DB_CONFIG.
  2. 2) Removed all files in /etc/openldap/slapd.d
  3.  
  4. 3) Execute:
  5. $ sudo slapadd -v -l /etc/openldap/slapd.ldif
  6. slapadd: line 1: databae #1 (dc=my-domain,dc=com) not configured to hold "cn=config"; did yo mean to use database #0 (cn=config)?
  7. _##### 25.97% eta none elapsed none spd 9.4 M/s
  8. Closing DB...
  9.  
  10. It would appear as if it's using another file somewhere's, but I specifically tell it the following slapd.ldif file which has no reference of my-domain.
  11. ----
  12. #
  13. # See slapd.d(5) for details on configuration options.
  14. # This file should NOT be world readable.
  15. #
  16. dn: cn=config
  17. objectClass: olcGlobal
  18. cn: config
  19. #
  20. #
  21. # Define global ACLs to disable default read access.
  22. #
  23. olcArgsFile: /var/lib/run/slapd.args
  24. olcPidFile: /var/lib/run/slapd.pid
  25. #
  26. # Do not enable referrals until AFTER you have a working directory
  27. # service AND an understanding of referrals.
  28. #olcReferral: ldap://root.openldap.org
  29. #
  30. # Sample security restrictions
  31. # Require integrity protection (prevent hijacking)
  32. # Require 112-bit (3DES or better) encryption for updates
  33. # Require 64-bit encryption for simple bind
  34. #olcSecurity: ssf=1 update_ssf=112 simple_bind=64
  35.  
  36.  
  37. #
  38. # Load dynamic backend modules:
  39. #
  40. #dn: cn=module,cn=config
  41. #objectClass: olcModuleList
  42. #cn: module
  43. #olcModulepath: /usr/lib64/openldap/openldap
  44. #olcModuleload: back_bdb.la
  45. #olcModuleload: back_hdb.la
  46. #olcModuleload: back_ldap.la
  47. #olcModuleload: back_passwd.la
  48. #olcModuleload: back_shell.la
  49.  
  50.  
  51. dn: cn=schema,cn=config
  52. objectClass: olcSchemaConfig
  53. cn: schema
  54.  
  55. include: file:///etc/openldap/schema/core.ldif
  56.  
  57. # Frontend settings
  58. #
  59. dn: olcDatabase=frontend,cn=config
  60. objectClass: olcDatabaseConfig
  61. olcDatabase: frontend
  62. #
  63. # Sample global access control policy:
  64. # Root DSE: allow anyone to read it
  65. # Subschema (sub)entry DSE: allow anyone to read it
  66. # Other DSEs:
  67. # Allow self write access
  68. # Allow authenticated users read access
  69. # Allow anonymous users to authenticate
  70. #
  71. #olcAccess: to dn.base="" by * read
  72. #olcAccess: to dn.base="cn=Subschema" by * read
  73. #olcAccess: to *
  74. # by self write
  75. # by users read
  76. # by anonymous auth
  77. #
  78. # if no access controls are present, the default policy
  79. # allows anyone and everyone to read anything but restricts
  80. # updates to rootdn. (e.g., "access to * by * read")
  81. #
  82. # rootdn can always read and write EVERYTHING!
  83. #
  84.  
  85.  
  86. #######################################################################
  87. # BDB database definitions
  88. #######################################################################
  89. #
  90. dn: olcDatabase=bdb,cn=config
  91. objectClass: olcDatabaseConfig
  92. objectClass: olcBdbConfig
  93. olcDatabase: bdb
  94. olcSuffix: dc=mylan,dc=local
  95. olcRootDN: cn=Manager,dc=mylan,dc=local
  96. # Cleartext passwords, especially for the rootdn, should
  97. # be avoided. See slappasswd(8) and slapd-config(5) for details.
  98. # Use of strong authentication encouraged.
  99. olcRootPW: secret
  100. # The database directory MUST exist prior to running slapd AND
  101. # should only be accessible by the slapd and slap tools.
  102. # Mode 700 recommended.
  103. olcDbDirectory: /var/lib/openldap-data
  104. # Indices to maintain
  105. olcDbIndex: objectClass eq
Advertisement
Add Comment
Please, Sign In to add comment