Bug 7336 - Can't compile idmap_passdb as shared module
Can't compile idmap_passdb as shared module
Product: Samba 3.4
Classification: Unclassified
Component: Winbind
x86 Linux
: P3 normal
: ---
Assigned To: Karolin Seeger
Samba QA Contact
Depends on:
  Show dependency treegraph
Reported: 2010-04-07 08:14 UTC by ALex
Modified: 2010-07-06 05:23 UTC (History)
0 users

See Also:
gd: review+


Note You need to log in before you can comment on or make changes to this bug.
Description ALex 2010-04-07 08:14:26 UTC
I have CentOS-5.4 box with all updates.I want to use samba as PDC with ldap
backend. All works fine, except winbind daemon. My samba version is 3.4.7.

# winbindd -D -d 3

# wbinfo -i test

all fine, but in log file I get the following error

[2010/02/02 17:16:55, 3] winbindd/idmap.c:302(idmap_init_domain)
idmap backend passdb not found
[2010/02/02 17:16:55, 5] lib/module.c:111(smb_probe_module)
Probing module 'passdb'
[2010/02/02 17:16:55, 5] lib/module.c:130(smb_probe_module)
Probing module 'passdb': Trying to load from /usr/lib/samba/idmap/passdb.so
[2010/02/02 17:16:55, 3] lib/module.c:48(do_smb_load_module)
Error loading module '/usr/lib/samba/idmap/passdb.so':
/usr/lib/samba/idmap/passdb.so: cannot open shared object file: No such file
or directory
[2010/02/02 17:16:55, 3] winbindd/idmap.c:307(idmap_init_domain)
Could not probe idmap module passdb
[2010/02/02 17:16:55, 1] winbindd/idmap.c:438(idmap_init_passdb_domain)
Could not init passdb idmap domain

Why does it try to load passdb.so? It was build statically

checking how to build idmap_passdb... static

When i try to build it dynamically

./configure \
--with-shared-modules=idmap_passdb \

I get the following error

Building plugin bin/smb_traffic_analyzer.so
Compiling modules/vfs_dirsort.c
Building plugin bin/dirsort.so
Compiling winbindd/idmap_ldap.c
Building plugin bin/ldap.so
make: *** No rule to make target `bin/passdb.so', needed by `all'.  Stop.
error: Bad exit status from /var/tmp/rpm-tmp.42756 (%build)

RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.42756 (%build)

My smb.conf

        dos charset = cp866
        unix charset = utf8
        display charset = utf8

        workgroup = W3
        server string = Primary Domain Controller
        passdb backend = ldapsam:"ldap://"

        client NTLMv2 auth = Yes
        log file = /var/log/samba/samba.log
        time server = Yes

        deadtime = 15
        socket options = TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192

        load printers = No
        printcap name = /dev/null
        disable spoolss = Yes
        show add printer wizard = No

        add user script = /usr/sbin/smbldap-useradd -m "%u"
        delete user script = /usr/sbin/smbldap-userdel "%u"
        add group script = /usr/sbin/smbldap-groupadd -p "%g"
        delete group script = /usr/sbin/smbldap-groupdel "%g"
        add user to group script = /usr/sbin/smbldap-groupmod -m "%u" "%g"
        delete user from group script = /usr/sbin/smbldap-groupmod -x "%u" "%g"
        set primary group script = /usr/sbin/smbldap-usermod -g "%g" "%u"
        add machine script = /usr/sbin/smbldap-useradd -w "%u"

        logon path =
        logon drive = Y:
        logon home = \\pdc\home\%U
        domain logons = Yes
        os level = 64
        lm announce = No
        preferred master = Yes
        domain master = Yes
        dns proxy = No
        wins support = Yes

        ldap admin dn = "cn=root,dc=w3,dc=lan"
        ldap group suffix = ou=groups
        ldap idmap suffix = ou=idmap
        ldap machine suffix = ou=computers
        ldap suffix = dc=w3,dc=lan
        ldap ssl = no
        ldap user suffix = ou=users

        idmap backend = ldap:"ldap://localhost"
        idmap alloc backend = ldap:"ldap://localhost"
        idmap uid = 50000-500000
        idmap gid = 50000-500000

        winbind enum users = Yes
        winbind enum groups = Yes

        idmap alloc config : range = 50000-500000
        idmap alloc config : ldap_url = ldap://
        idmap alloc config : ldap_user_dn = cn=root,dc=w3,dc=lan
        idmap alloc config : ldap_base_dn = ou=idmap,dc=w3,dc=lan

        idmap config BUILTIN : ldap_url = ldap://
        idmap config BUILTIN : ldap_user_dn = cn=root,dc=w3,dc=lan
        idmap config BUILTIN : ldap_base_dn = ou=idmap,dc=w3,dc=lan
        idmap config BUILTIN : backend = ldap

        idmap config W3 : ldap_url = ldap://
        idmap config W3 : ldap_user_dn = cn=root,dc=w3,dc=lan
        idmap config W3 : ldap_base_dn = ou=idmap,dc=w3,dc=lan
        idmap config W3 : backend = ldap

        ldapsam:editposix = yes
        ldapsam:trusted = yes

        admin users = administrator

Any idea?
Comment 1 Volker Lendecke 2010-07-04 03:09:43 UTC

fixes it for me. Günther, can you ack it for 3.4 and 3.5? For me it applies cleanly to both.

Comment 2 Guenther Deschner 2010-07-05 11:00:48 UTC
Yes, looks fine.

Karolin, can you please pick for 3.4 and 3.5 ?
Comment 3 Karolin Seeger 2010-07-06 05:23:02 UTC
Pushed to v3-5-test and v3-4-test.
Closing out bug report.