Ubuntu OpenLDAP TLS Init Def Ctx Failed – How to Fix

openldap

I had a working OpenLDAP but broke it while trying to configure SSL using the instructions here: https://help.ubuntu.com/10.04/serverguide/C/openldap-server.html. Now I'm getting the following error when I try to start ldap with -d -1:

TLS: only one of certfile and keyfile specified

main: TLS init def ctx failed: -1

Being a newbie, I think it's entirely possible that I messed something up (I have a concern that I did the ldapmodify step from the instructions above wrong), but I don't know how to undo what I've done. I can't start ldapmodify b/c the server is down. So I have two questions:

  1. What could be causing this error?
  2. How can I get back to my previously working (but no SSL) version of OpenLDAP?

Note: I am not a *nix admin and was only trying to get an SSL version of OpenLDAP to test my app against. So please talk slowly and use big words!

Best Answer

I don't have access to my openldap server right now, but I'm pretty sure you can change this directly in the fancy new slapd.d/ directory, even though it is not recommended.

See what you get when you run (assuming this is the directory containing your slapd configuration) this:

grep -R olcTLS /etc/openldap/slapd.d