Following the server guide to setup Samba authentication with OpenLDAP

All seems to go well until Adding Samba LDAP objects when running this command:

sudo smbldap-populate

I get this error:

Unable to open /etc/smbldap-tools/smbldap.conf for reading !  
Compilation failed in require at /usr/sbin/smbldap-populate line 30.  
BEGIN failed--compilation aborted at /usr/sbin/smbldap-populate line 30.  

I've checked and in deed the folder /etc/smbldap-tools exists, but is empty, missing the required smbldap.conf

I've tried:

sudo apt purge smbldap-tools

Which removes the directory, but when I reinstall:

sudo apt install smbldap-tools

It just creates an empty folder again. What should I do?


If you read the directions very closely, it says:

The package comes with a configuration helper script, smbldap-config.pl, that will ask questions.

So with a little guesswork, the missing step is to run:

sudo smbldap-config

which will run through an interactive script that will generate both:


Perhaps the file was omitted by whoever packaged it. The corresponding Fedora package has it; you could grab it and put in place. Or you could grab a copy from the source code here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.