kaktux's picture


Since there are some topics - unsolved in here - about how to connect a client to Turnkey OpenLDAP - here is my solution for a basic connection.

- Server is Turnkey OpenLDAP, with base dn ldap.turnkey.com , IP 192.168.8.5 , user "testuser" created via phpLDAPadmin
- Client is a minimal installation of (K)ubuntu 20.04 with only openssh-server added after base installation, so ssh can be used to connect to the client.

1. install libnss-ldapd
(this will configure /etc/nslcd.conf)
uri: ldap://192.168.8.5/
base: dc=ldap,dc=turnkey,dc=com
(after it will configure /etc/nsswitch.conf)
check passwd, group and shadow

2. install pam-ldapd
(this will configure /etc/pam.d/common-* files)
if already installed reconfigure with "pam-auth-update" or "dpkg-reconfigure libpam-runtime"
5 Options should show (else modules are missing/uninstalled) -> check all incl. create homeDirectory

sudo service nslcd restart
sudo service nscd restart

-> login via gui with testuser

This works for me. Hope it helped.

Infos i got from:

Debian Wiki

Especially sections LDAP/NSS and LDAP/PAM


Djware - Install the LDAP client on Linux

There is also a video about the server setup - which turnkey does for you already. Just in case you are interested.

Forum: 
Jeremy Davis's picture

Sorry I was a little slow getting to you. Glad to hear that you worked it out, plus it's awesome that you posted your solution here!

Perhaps there is value in pre-installing/pre-configuring some of that stuff? What do you think?

Add new comment