-3

I'm really flying blind here trying to use both Linux and OpenLDAP for the first time ever.

My ultimate goal here is to connect to an OpenLDAP server from within a C# console app and to authenticate a user. To that end, on my Windows 10 machine, I have created a Hyper-V VM that is running CentOS. And on it, I have installed OpenLDAP client and server. To configure the server, I have been following this tutorial:

https://www.golinuxcloud.com/install-and-configure-openldap-centos-7-linux/

I followed along very nicely up to the section that begins with, “Modifying Objects: Replace olcSuffix and olcRootDN attribute.”

Now, I'm getting lost. Let's start with this: When I try to use this command:

cat my_config.ldif

I get this error:

No such file or directory

And this is what the tutorial is doing:

[root@ldap-server ~]# cat my_config.ldif
dn: olcDatabase={2}hdb,cn=config
changetype: modify
replace: olcSuffix
olcSuffix: dc=example,dc=com

What am I doing wrong?

0
2

Well, you didn't create the file.

You are probably mixing up the .ldif file that is used as input to ldapadd/ldapmodify and the .ldif files that are used as storage for OpenLDAP's cn=config tree. Those have different purposes; the former are created by you the sysadmin, the latter are internal data files maintained by OpenLDAP itself.

So the tutorial isn't showing you what's supposed to be in /etc/openldap – it's telling you to create a file similar to the example it shows (in a temporary location, not at /etc), and at the end of the section, you'll run ldapmodify to import it into the database.

3
  • ok, thanks. I am really struggling to find a good, for-dummies type tutorial on this. All of them seem to assume that I know things which I don't. Sep 4 '19 at 13:32
  • Well, it's going to be the same regardless topic – advanced tutorials will always expect you to have a grasp on Linux basics, instead of "flying blind".
    – user1686
    Sep 4 '19 at 15:26
  • exactly my problem. I am trying to learn both Linux and OpenLDAP at the same time. Sep 4 '19 at 15:27

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.