Bug 1497018 - LDB_MODULES_PATH not set by package (ldb or samba)
Summary: LDB_MODULES_PATH not set by package (ldb or samba)
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: samba4
Version: 27
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Orphan Owner
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-29 01:55 UTC by linforpros
Modified: 2019-04-10 04:42 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-09-29 05:20:28 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description linforpros 2017-09-29 01:55:38 UTC
Description of problem:
LDB_MODULES_PATH not set in ldb-tools-1.2.1-3.fc27.x86_64 or samba-common-libs-4.7.0-12.fc27.x86_64


Version-Release number of selected component (if applicable):
ldb-tools-1.2.1-3.fc27.x86_64
rpm -qf /usr/lib64/samba/ldb/
samba-common-libs-4.7.0-12.fc27.x86_64


How reproducible:
Install samba as ADDC with samba-tools
ldbsearch -H /var/lib/samba/private/sam.ldb

Steps to Reproduce:
1. ldbsearch -H /var/lib/samba/private/sam.ldb
2.
3.

Actual results:
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)


Expected results:
Records shoud be displayed

Additional info:
export LDB_MODULES_PATH=/usr/lib64/samba/ldb

temporarily fixes the problem, until the next reboot.

Comment 1 Alexander Bokovoy 2017-09-29 05:20:28 UTC
ldb-tools is a general package, not tied too much to Samba itself. SSSD, for example, while using ldb database, does not need modules from /usr/lib64/samba/ldb for its own operation. It has own modules that it installs into /usr/lib64/ldb/modules/ldb.

As result, you need to know what you do when looking into a particular application's ldb databases. Samba does set up own LDB_MODULES_PATH on start so that its modules used correctly.

This piece of information probably needs to be made a part of Samba AD DC documentation upstream.

Comment 2 Sergio Basto 2019-02-21 05:55:13 UTC
BTW I got same problem with my custom Samba AD on Centos 7 [1] , my samba use and provide internal ldb-tools 

I can't start sssd with set or export LDB_MODULES_PATH=/usr/lib64/ldb/modules/ldb/ [2]

looking for .spec code [3] ./configure --with-modulesdir=%{_libdir}/ldb/modules
when in my samba.spec use --with-modulesdir=%{_libdir}/samba  
and that makes the difference 

fedora package reads /usr/lib64/ldb/modules/ldb/memberof.so

i.e. to work without exports ldb modules must be install in same directory of sssd [4]




[1]
https://copr.fedorainfracloud.org/coprs/sergiomb/SambaAD/

[2]
LDB_MODULES_PATH=/usr/lib64/ldb/modules/ldb/ ldbsearch -H  /var/lib/sss/db/cache_domain.local.ldb (works)

[3]
https://src.fedoraproject.org/rpms/libldb/blob/master/f/libldb.spec

[4]
rpm -qf  /usr/lib64/ldb/modules/ldb/*
libldb-1.3.4-1.el7.x86_64
sssd-common-1.16.0-19.el7.x86_64
libldb-1.3.4-1.el7.x86_64
libldb-1.3.4-1.el7.x86_64
libldb-1.3.4-1.el7.x86_64
libldb-1.3.4-1.el7.x86_64
libldb-1.3.4-1.el7.x86_64
libldb-1.3.4-1.el7.x86_64
libldb-1.3.4-1.el7.x86_64

Comment 3 Sergio Basto 2019-04-09 02:11:32 UTC
(*) with set -> without set

Comment 4 Sergio Basto 2019-04-10 04:42:44 UTC
the easy way seems add  /usr/lib64/ldb/modules/ldb/memberof.so to other ldb modules

cd /usr/lib64/samba/ldb/
ln -s /usr/lib64/ldb/modules/ldb/memberof.so .


Note You need to log in before you can comment on or make changes to this bug.