The problem: To operate on the databases samba 4.0.x creates, the utilities that come with sys-libs/ldb (e.g. ldbsearch) need additional "plugin" modules that are not part of sys-libs/ldb itself. Per >=net-fs/samba-4.0.0, these modules are installed in '/usr/$(get_libdir)/samba/ldb'. Additionally, ldb needs its own modules, which are installed in '/usr/$(get_libdir)/ldb/modules/ldb'. Sadly, the ldb utils can not be given a search path for their modules. Instead, all modules have to reside in the same directory. If they don't, you cannot browse, modify, etc. ldb files or URL's with tools like ldbsearch, ldbdelete, ldbmodify and so on. Instead, you get error messages like: # ldbsearch -H /var/lib/samba/private/sam.ldb WARNING: Module [samba_dsdb] not found - do you need to set LDB_MODULES_PATH? Unable to load modules for /var/lib/samba/private/sam.ldb: (null) Failed to connect to /var/lib/samba/private/sam.ldb - (null) Thus, it would be advisable to change the ebuild for sys-libs/ldb according to the attached patch. By doing so, the ldb modules are placed in '/usr/$(get_libdir)/samba/ldb' (note that the 'ldb' path component is appended automatically). Doing so won't affect ldb uses outside samba, but will make operating on samba's ldb files possible (again). Best, Torsten Reproducible: Always
Created attachment 345596 [details, diff] Patch for sys-libs/ldb-1.1.15.ebuild to correct --with-modulesdir line
Created attachment 345600 [details, diff] Patch for net-fs/samba-4.0.4 ebuild to correctly move the ldb modules. I just found that the problem lies with net-fs/samba: In the net-fs/samba-4.0.4 ebuild, line 132 is wrong and needs to be changed according to the attached patch. No changes to the sys-libs/ldb ebuild are necessary.
IMHO, the former explanation was better - see what I've wrote in bug 447022.
(In reply to comment #3) > IMHO, the former explanation was better - see what I've wrote in bug 447022. Either way is fine with me. Only want it to be fixed... :-)
+*ldb-1.1.15-r1 (07 Jun 2013) + + 07 Jun 2013; Lars Wendler <polynomial-c@gentoo.org> -ldb-1.1.13.ebuild, + -ldb-1.1.14.ebuild, +ldb-1.1.15-r1.ebuild: + Non-maintainer commit: Attempt to fix bug #465956. Removed old versions. + Please report back if this fixes the problem in combination with samba-4.0.6
I just wanted to chime in here to let people know that this fix has caused sssd to fail because it can't find its module. I've opened a separate bug for that issue <https://bugs.gentoo.org/show_bug.cgi?id=473046>.
Well, the problem is all of ldb users need to be kept in sync and again short on people here.
> Please report back if this fixes the problem in combination with samba-4.0.6 Works for me. Thanks, Torsten