Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Samba] No builtin nor plugin backend for ldapsam found

635 views
Skip to first unread message

Francesco Malvezzi

unread,
Jun 3, 2015, 6:50:03 AM6/3/15
to
Hi all,

in order to upgrade a working samba3 domain controller with OpenLDAP
backend, I compiled samba-4.1.17 with the following switches:

--with-ldap

according to configure log, the compiler found the ldap libraries:
[...]
Checking for header ldap.h
: yes
Checking for header lber.h
: yes
Checking for header ldap_pvt.h
: no
Checking for ber_tag_t
: ok
Checking for library lber
: yes
[...]
Checking for variable LDAP_OPT_SOCKBUF
: ok
Checking for variable LBER_OPT_LOG_PRINT_FN
: ok
Checking for library ldap
: yes
Checking for ldap_init
: ok
Checking for ldap_init_fd
: ok
Checking for ldap_initialize
: ok
Checking for ldap_set_rebind_proc
: ok
Checking for ldap_add_result_entry
: ok
Checking whether ldap_set_rebind_proc takes 3 arguments
: ok
Building with Active Directory support.
[...]

nevertheless, while smbd refuses to start with:
No builtin nor plugin backend for ldapsam found

So it looks I didn't enable ldapsam support.

What did I miss? How to enable ldapsam support in samba4?

thank you,

Francesco
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba

Rowland Penny

unread,
Jun 3, 2015, 7:10:04 AM6/3/15
to
Hmm, '--with-ldap' is the default, so you don't really need to give it,
what OS are you compiling on ? what extra packages did you install
before you compiled samba ?

Rowland

Francesco Malvezzi

unread,
Jun 3, 2015, 7:50:03 AM6/3/15
to
> Hmm, '--with-ldap' is the default, so you don't really need to give it,
> what OS are you compiling on ? what extra packages did you install
> before you compiled samba ?
>
> Rowland


it is Debian GNU/Linux Wheezy, with:

ii libldap2-dev:i386 2.4.31-2
i386 OpenLDAP development libraries
ii libsasl2-dev 2.1.25.dfsg1-6+deb7u1
i386 Cyrus SASL - development files for authentication
abstraction library

do you need extra details? Did I answer to your question?

thank for your time,

Francesco

Rowland Penny

unread,
Jun 3, 2015, 8:00:05 AM6/3/15
to
On 03/06/15 12:42, Francesco Malvezzi wrote:
>> Hmm, '--with-ldap' is the default, so you don't really need to give it,
>> what OS are you compiling on ? what extra packages did you install
>> before you compiled samba ?
>>
>> Rowland
>
> it is Debian GNU/Linux Wheezy, with:
>
> ii libldap2-dev:i386 2.4.31-2
> i386 OpenLDAP development libraries
> ii libsasl2-dev 2.1.25.dfsg1-6+deb7u1
> i386 Cyrus SASL - development files for authentication
> abstraction library
>
> do you need extra details? Did I answer to your question?
>
> thank for your time,
>
> Francesco

No, I don't need any more details and yes, you did answer my question
(well sort of, I am sure you installed more packages than that).

Stop building samba, add this to /etc/apt/sources.list

# wheezy-backports
deb http://ftp.uk.debian.org/debian wheezy-backports main
deb-src http://ftp.uk.debian.org/debian wheezy-backports main

NOTE: replace 'uk' with your country code, probably 'it'

run 'apt-get update'

install samba with:

apt-get -t wheezy-backports install samba samba-common-bin samba-common
samba-libs samba-vfs-modules samba-dsdb-modules tdb-tools libwbclient0
libsmbclient winbind ldb-tools zip arj mktemp acl attr quota krb5-config
libnss-winbind libpam-winbind libpam-krb5 krb5-user

This will get you samba 4.1.17

Rowland

Francesco Malvezzi

unread,
Jun 3, 2015, 8:50:06 AM6/3/15
to
Il 03/06/15 13:58, Rowland Penny ha scritto:
> On 03/06/15 12:42, Francesco Malvezzi wrote:
>>> Hmm, '--with-ldap' is the default, so you don't really need to give it,
>>> what OS are you compiling on ? what extra packages did you install
>>> before you compiled samba ?
>>>
>>> Rowland
>>
>> it is Debian GNU/Linux Wheezy, with:
>>
>> ii libldap2-dev:i386 2.4.31-2
>> i386 OpenLDAP development libraries
>> ii libsasl2-dev 2.1.25.dfsg1-6+deb7u1
>> i386 Cyrus SASL - development files for authentication
>> abstraction library
>>
>> do you need extra details? Did I answer to your question?
>>
>> thank for your time,
>>
>> Francesco
>
> No, I don't need any more details and yes, you did answer my question
> (well sort of, I am sure you installed more packages than that).

Yes!

>
> Stop building samba, add this to /etc/apt/sources.list
>
> # wheezy-backports
> deb http://ftp.uk.debian.org/debian wheezy-backports main
> deb-src http://ftp.uk.debian.org/debian wheezy-backports main
>
> NOTE: replace 'uk' with your country code, probably 'it'
>
> run 'apt-get update'
>
> install samba with:
>
> apt-get -t wheezy-backports install samba samba-common-bin samba-common
> samba-libs samba-vfs-modules samba-dsdb-modules tdb-tools libwbclient0
> libsmbclient winbind ldb-tools zip arj mktemp acl attr quota krb5-config
> libnss-winbind libpam-winbind libpam-krb5 krb5-user
>
> This will get you samba 4.1.17

that could be fine, but I have already samba installed in /opt and I
would like to install side-by-side samba3 and samba4.

But I understand it takes a lot of time to debug my faulty installation.

In a working install, where is located ldapsam backend lib? ($PREFIX/lib)

thank you again,

Francesco

Rowland Penny

unread,
Jun 3, 2015, 9:00:07 AM6/3/15
to
To what end? you cannot run two instances of samba at the same time
without jumping through hoops.

>
> But I understand it takes a lot of time to debug my faulty installation.

What is wrong with your existing installation ?

>
> In a working install, where is located ldapsam backend lib? ($PREFIX/lib)

It is where ever your installation of openldap puts it, from memory on
wheezy it is likely to be /var/lib/ldap, but you need something to read
it, ldapsearch, LAM or similar.

Rowland

Francesco Malvezzi

unread,
Jun 4, 2015, 3:10:02 AM6/4/15
to
[...]
>>> This will get you samba 4.1.17
>> that could be fine, but I have already samba installed in /opt and I
>> would like to install side-by-side samba3 and samba4.
>
> To what end? you cannot run two instances of samba at the same time
> without jumping through hoops.

A Debian install is going to put directories, executables and state file
all over file system. A custom install with $PREFIX=/opt/samba4 is
easier to match with the current running installation of samba3 which is
in /opt/samba

>
>>
>> But I understand it takes a lot of time to debug my faulty installation.
>
> What is wrong with your existing installation ?

What was faulty was my compilation of samba4 which lacked ldapsam support.

Actually it was a stupid mistake. Sometime in the past I added
/opt/samba/lib (the samba3 install directory) to the ldconfig.
Removing that directory, samba4 compiles, make and installs fine with
ldapsam.

thank you,
0 new messages