intore

Untitled

Apr 30th, 2012
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.05 KB | None | 0 0
  1. from the beginning:
  2.  
  3. smbldap-populate gave me these errors:
  4.  
  5. root@amahoro:~# smbldap-populate
  6. Populating LDAP directory for domain AMAHORO (S-1-5-21-251852451-2940789264-3475694606)
  7. (using builtin directory structure)
  8.  
  9. entry dc=amahoro,dc=bi already exist.
  10. entry ou=Users,dc=amahoro,dc=bi already exist.
  11. entry ou=Groups,dc=amahoro,dc=bi already exist.
  12. entry ou=Computers,dc=amahoro,dc=bi already exist.
  13. entry ou=Idmap,dc=amahoro,dc=bi already exist.
  14. adding new entry: uid=root,ou=Users,dc=amahoro,dc=bi
  15. failed to add entry: index generation failed at /usr/sbin/smbldap-populate line 498, <GEN1> line 58.
  16. adding new entry: uid=nobody,ou=Users,dc=amahoro,dc=bi
  17. failed to add entry: index generation failed at /usr/sbin/smbldap-populate line 498, <GEN1> line 89.
  18. adding new entry: cn=Domain Admins,ou=Groups,dc=amahoro,dc=bi
  19. failed to add entry: index generation failed at /usr/sbin/smbldap-populate line 498, <GEN1> line 101.
  20. adding new entry: cn=Domain Users,ou=Groups,dc=amahoro,dc=bi
  21. failed to add entry: index generation failed at /usr/sbin/smbldap-populate line 498, <GEN1> line 112.
  22. adding new entry: cn=Domain Guests,ou=Groups,dc=amahoro,dc=bi
  23. failed to add entry: index generation failed at /usr/sbin/smbldap-populate line 498, <GEN1> line 123.
  24. adding new entry: cn=Domain Computers,ou=Groups,dc=amahoro,dc=bi
  25. failed to add entry: index generation failed at /usr/sbin/smbldap-populate line 498, <GEN1> line 134.
  26. adding new entry: cn=Administrators,ou=Groups,dc=amahoro,dc=bi
  27. failed to add entry: index generation failed at /usr/sbin/smbldap-populate line 498, <GEN1> line 179.
  28. adding new entry: cn=Account Operators,ou=Groups,dc=amahoro,dc=bi
  29. failed to add entry: index generation failed at /usr/sbin/smbldap-populate line 498, <GEN1> line 201.
  30. adding new entry: cn=Print Operators,ou=Groups,dc=amahoro,dc=bi
  31. failed to add entry: index generation failed at /usr/sbin/smbldap-populate line 498, <GEN1> line 212.
  32. adding new entry: cn=Backup Operators,ou=Groups,dc=amahoro,dc=bi
  33. failed to add entry: index generation failed at /usr/sbin/smbldap-populate line 498, <GEN1> line 223.
  34. adding new entry: cn=Replicators,ou=Groups,dc=amahoro,dc=bi
  35. failed to add entry: index generation failed at /usr/sbin/smbldap-populate line 498, <GEN1> line 234.
  36. entry sambaDomainName=AMAHORO,dc=amahoro,dc=bi already exist. Updating it...
  37.  
  38. Please provide a password for the domain root:
  39. /usr/sbin/smbldap-passwd: user root doesn't exist
  40.  
  41. I thought to use slapindex to regenerat the indices also, the output was:
  42.  
  43. stefano@amahoro:~$ /usr/sbin/slapindex
  44. /etc/ldap/slapd.conf: line 20: invalid path: Permission denied
  45. slapindex: bad configuration file!
  46.  
  47. This is my slapd.conf
  48.  
  49. #Basics
  50. include /etc/ldap/schema/core.schema
  51. include /etc/ldap/schema/cosine.schema
  52. include /etc/ldap/schema/nis.schema
  53. include /etc/ldap/schema/inetorgperson.schema
  54. include /etc/ldap/schema/samba.schema
  55.  
  56. pidfile /var/run/slapd/slapd.pid
  57. argsfile /var/run/slapd/slapd.args
  58. loglevel 256
  59.  
  60. modulepath /usr/lib/ldap
  61. moduleload back_hdb
  62.  
  63. #Database configuration
  64. database hdb
  65. suffix "dc=amahoro,dc=bi"
  66. rootdn "cn=Manager,dc=amahoro,dc=bi"
  67. rootpw {SSHA}XBLZ+TknuZHW3dirN2SE2fj3mYka3tkG
  68. directory /var/lib/ldap <----------------------------- LINE 20
  69. index uid,uidNumber,gidNumber,memberUid eq
  70. index cn,mail,surname,givenname eq,subinitial
  71. index sambaSID eq
  72. index sambaPrimaryGroupSID eq
  73.  
  74.  
  75. #ACLs
  76. access to attrs=userPassword
  77. by anonymous auth
  78. by self write
  79. by * none
  80.  
  81. access to *
  82. by dn.base="uid=nslcd_proc,ou=System,dc=amahoro,dc=bi" read
  83. by self write
  84. by * none
  85.  
  86.  
  87. These the permissions of /var/lib/ldap/
  88.  
  89. drwxr-x--- 2 openldap openldap 4096 Apr 29 09:57 ldap
  90.  
  91. -rw-r--r-- 1 openldap openldap 4096 Apr 29 09:57 alock
  92. -rw------- 1 openldap openldap 8192 Apr 28 12:18 cn.bdb
  93. -rw------- 1 openldap openldap 24576 Apr 29 09:57 __db.001
  94. -rw------- 1 openldap openldap 352256 Apr 29 09:57 __db.002
  95. -rw------- 1 openldap openldap 2629632 Apr 29 09:57 __db.003
  96. -rw------- 1 openldap openldap 163840 Apr 29 09:57 __db.004
  97. -rw------- 1 openldap openldap 876544 Apr 29 09:57 __db.005
  98. -rw------- 1 openldap openldap 32768 Apr 29 09:57 __db.006
  99. -rw-r--r-- 1 openldap openldap 96 Apr 23 17:34 DB_CONFIG
  100. -rw------- 1 openldap openldap 8192 Apr 28 14:23 dn2id.bdb
  101. -rw------- 1 openldap openldap 8192 Apr 28 14:23 gidNumber.bdb
  102. -rw------- 1 openldap openldap 32768 Apr 28 14:23 id2entry.bdb
  103. -rw------- 1 openldap openldap 10485760 Apr 29 09:57 log.0000000001
  104. -rw------- 1 openldap openldap 8192 Apr 28 12:18 mail.bdb
  105. -rw------- 1 openldap openldap 8192 Apr 28 14:00 memberUid.bdb
  106. -rw------- 1 openldap openldap 8192 Apr 28 11:52 objectClass.bdb
  107. -rw------- 1 openldap openldap 8192 Apr 28 14:23 sambaSID.bdb
  108. -rw------- 1 openldap openldap 8192 Apr 28 12:18 sn.bdb
  109. -rw------- 1 openldap openldap 8192 Apr 28 12:18 uid.bdb
  110. -rw------- 1 openldap openldap 8192 Apr 28 14:23 uidNumber.bdb
  111.  
  112.  
  113. other check:
  114.  
  115. using
  116. sudo strace /usr/sbin/slapindex
  117. i found the line:
  118. open("/var/lib/ldap/DUMMY", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = -1 EACCES (Permission denied)
  119. but in that directory there is not "DUMMY"
  120.  
  121. Today i changed the permissions of the files in /var/lib/ldap/ to 0755.
  122.  
  123. I retried with slapindex with the same result:
  124.  
  125. from root:
  126. sudo /usr/sbin/slapindex
  127.  
  128. WARNING!
  129. Runnig as root!
  130. There's a fair chance slapd will fail to start.
  131. Check file permissions!
  132.  
  133. from normal user:
  134. usr/sbin/slapindex
  135. /etc/ldap/slapd.conf: line 20: invalid path: Permission denied
  136. slapindex: bad configuration file!
  137.  
  138. I repeated strace and i didn't find errors
  139.  
  140. I repeated slapindex from root and from normal user but the result was the same as above.
  141.  
  142. I repeated smbldap-populate and magically it runs but i don't know if everything is ok because slapindex give me errors again.
  143.  
  144. Have tou got ideas or suggests to give me please?
Advertisement
Add Comment
Please, Sign In to add comment