Note:
This documentation has moved to a new home! Please update your bookmarks to the new URL for the up-to-date version of this page.
I followed these instructions and it didn’t all work. It appears that when I installed it there was no cn=admin,dc=example,dc=com created and as such the ldapwhoami instruction didn’t work. Also my /etc/ldap/schema directory does not have a ppolicy.ldif file.
I’m reasonably new to both Ubuntu and LDAP so I’m not sure if I did something wrong or things have changed since this tutorial was written?
I’m using Ubuntu Server 22.04.1 LTS (Jammy Jellyfish).
Hi m-g-brown, is it possible you did not run sudo dpkg-reconfigure slapd? I’m finding when I do that, and enter example.com as the doc suggests, I get the expected results:
$ ldapsearch -x -LLL -H ldap:/// -b dc=example,dc=com dn
dn: dc=example,dc=com
$ ldapwhoami -x -D cn=admin,dc=example,dc=com -W
Enter LDAP Password:
dn:cn=admin,dc=example,dc=com
However, I can confirm the ppolicy.ldif file is not present on my jammy install, but is present on a bionic install, so you’re right that this has changed, and the doc should be updated to reflect that. I am not very familiar with ldap schemas but am guessing since it’s just an example we can substitute in one of the other .ldif files.
I did run sudo dpkg-reconfigure slapd, more than once. I did however use a different domain to example.com, but I didn’t want to expose that here. If other people are having success, maybe I need to dig into this a bit further.
Hi @m-g-brown,
When you ran dpkg-reconfigure slapd, what was the output you saw on the terminal? Could you paste it here? By the way, there is no need to provide the domain name nor any private information along with the paste, so feel free to remove them before posting.
Thanks very much for this tutorial.
In the provided add_content.ldif there are newlines with spaces between the entries

which causes ldap_add to complain
Enter LDAP Password:
ldapadd: attributeDescription "dn": (possible missing newline after line 9, entry "ou=People,dc=example,com"?)
...
as a ldap n00b I initially gave up and then googled till I found an SO post explaining that the multiple entries have to be separated by empty newlines.
Please update the exapmle perhaps?
Oops! It turns out that wasn’t the only one, so I’ve fixed them all now. Thank you for bringing it to our attention and helping us make the Server Guide better ![]()