[Date Prev][Date Next] [Chronological] [Thread] [Top]

the permission wrong of the database which created by slapindex.



Hi lists:

My installation is openldap-2.1.30 which hosted in a gentoo linux box. I have set some index in slapd.conf:
index objectClass eq
index associatedDomain pres,eq
index mail pres,eq
index mailalternateaddress pres,eq
index accountStatus pres,eq
index deliveryMode pres,eq
index uid pres,eq
index mailforwardingaddress pres,eq
mode 0600


Then i run the command slapindex with the user root.

After that i found all the db files created by slapindex belongs to root:root.
And the permission is 0600.
Here it is:
-rw------- 1 root root 28672 12月 29 16:13 accountStatus.bdb
-rw------- 1 root root 20480 12月 29 16:13 associatedDomain.bdb
-rw------- 1 ldap ldap 8192 12月 26 16:42 __db.001
-rw------- 1 ldap ldap 270336 12月 26 16:42 __db.002
-rw------- 1 ldap ldap 98304 12月 26 16:42 __db.003
-rw------- 1 ldap ldap 368640 12月 26 16:42 __db.004
-rw------- 1 ldap ldap 16384 12月 26 16:42 __db.005
-rw------- 1 root root 20480 12月 29 16:13 deliveryMode.bdb
-rw------- 1 ldap ldap 491520 12月 29 16:13 dn2id.bdb
-rw------- 1 ldap ldap 884736 12月 29 16:13 id2entry.bdb
-rw------- 1 ldap ldap 6602634 12月 29 16:13 log.0000000001
-rw------- 1 root root 20480 12月 29 16:13 mailAlternateAddress.bdb
-rw------- 1 root root 24576 12月 29 16:13 mail.bdb
-rw------- 1 root root 20480 12月 29 16:13 mailForwardingAddress.bdb
-rw------- 1 ldap ldap 102400 12月 29 16:13 objectClass.bdb
-rw------- 1 root root 24576 12月 29 16:13 uid.bdb


But i think it should not belong to root instead of ldap.
So i try to run this command with the user ldap. But i found that ldap even could not login in gentoo default setting.


What's the correct user i should use when run the command "slapindex" or is there anything else i have lost?

Thank very much

Wang