[Samba] samba4 adding an index to sam.ldb

Bo Kersey bo at vircio.com
Sat Sep 14 08:10:29 MDT 2013


I have a large installation >20k users.  We're using samba4 for AD Authentication, and also email address validation.  I'm trying to edit the @INDEXLIST in sam.ldb to add an index on otherMailbox to speed up searches (0.05 sec for indexed, vs 2.5 sec for non-indexed searches) I'm finding that when I use ldbedit to do this, it appears to add the additional @IDXATTR.  However, when I go back and check via ldbsearch, the attribute is not there.  Seems to be failing silently...  How do I debug this?


ldbsearch -P -s base -b @INDEXLIST -H sam.ldb 
# record 1
dn: @INDEXLIST
@IDXONE: 1
@IDXVERSION: 2
@IDXATTR: mail
@IDXATTR: mSMQLabelEx
.... detail removed for brevity
@IDXATTR: msSFU30IsValidContainer
distinguishedName: @INDEXLIST

# returned 1 records
# 1 entries
# 0 referrals


ldbedit -v -P -s base -b @INDEXLIST -H sam.ldb

dn: @INDEXLIST
changetype: modify
replace: @IDXATTR
@IDXATTR: mail
@IDXATTR: otherMailbox
@IDXATTR: mSMQLabelEx
.... detail removed for brevity
@IDXATTR: msSFU30IsValidContainer
-

# 0 adds  1 modifies  0 deletes

wait for indexing to complete....

Then:
ldbsearch -P -s base -b @INDEXLIST -H sam.ldb
and it takes a long long time, like it is reindexing again...
# record 1
dn: @INDEXLIST
@IDXONE: 1
@IDXVERSION: 2
@IDXATTR: mail
@IDXATTR: mSMQLabelEx
.... detail removed for brevity
@IDXATTR: msSFU30IsValidContainer
distinguishedName: @INDEXLIST

# returned 1 records
# 1 entries
# 0 referrals



-- 
Bo Kersey
VirCIO - managed network solutions
4314 Avenue C
Austin, TX 78751
phone: (512)374-0500

If it is free, you are the product.


More information about the samba mailing list