# Integrating open LDAP with cnMaestro

**URL:** https://community.cambiumnetworks.com/t/integrating-open-ldap-with-cnmaestro/61162
**Category:** cnMaestro
**Created:** [April 10, 2019, 5:57am UTC](https://community.cambiumnetworks.com/t/integrating-open-ldap-with-cnmaestro/61162 "2019-04-10T05:57:08Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Support\_Kumar](https://d10gw3vjmzyp8.cloudfront.net/user_avatar/community.cambiumnetworks.com/support_kumar/32/11547_2.png) [@Support\_Kumar](https://community.cambiumnetworks.com/u/Support_Kumar)
#### Post date: [April 10, 2019, 5:57am UTC](https://community.cambiumnetworks.com/t/integrating-open-ldap-with-cnmaestro/61162/1 "2019-04-10T05:57:08Z")

</div>

**1.&nbsp;**** Overview**

&nbsp; &nbsp; &nbsp; &nbsp; This document presents basic configuration for cnMaestro Authentication Server Type with LDAP using the Ubuntu LDAP Server.  
  
2. **&nbsp;Introduction**

&nbsp; &nbsp; &nbsp; &nbsp; LDAP, or Lightweight Directory Access Protocol, is a protocol for managing related information from a centralized location through the use of a file and directory hierarchy.

It functions in a similar way to a relational database in certain ways, and can be used to organize and store any kind of information. LDAP is commonly used for centralized authentication  
  
**3.&nbsp;Installation**

**&nbsp; &nbsp; &nbsp;Server Requirements:**  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Ubuntu 16.04.4 LTS (GNU/Linux 4.4.0-116-generic x86\_64)

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Assume that our LDAP server will be hosted on a machine with the FQDN of&nbsp;myldap.test.com

Step-1: sudo hostnamectl set-hostname myldap

Step-2: sudo nano /etc/hosts

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 127.0.1.1 myldap.test.com myldap

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 127.0.1.1 localhost

Step-3: sudo apt-get update

Step-4: sudo apt-get install slapd ldap-utils

&nbsp; You will be asked below questions about how you'd like to configure

- Omit OpenLDAP server configuration?&nbsp; **No**
- DNS domain name? **test.com** &nbsp;

- Organization name? **MYCOMPANY** Administrator password?

_&nbsp; Note: Use the password you configured during installation, or choose another one&nbsp;_

- Database backend to use?&nbsp; **HDB**
- Remove the database when slapd is purged?&nbsp; **No**
- Move old database?&nbsp; **Yes**
- Allow LDAPv2 protocol?&nbsp; **No**

Step-5:  
sudo apt-get install phpldapadmin&nbsp;  
  
Step-6: sudo nano /etc/phpldapadmin/config.php

&nbsp; &nbsp;Search for the following sections and modify them accordingly

- $servers-\>setValue('server','host','domain\_nam\_or\_IP\_address');
- $servers-\>setValue('server','base',array('dc=test,dc=com'));
- $servers-\>setValue('login','bind\_id','cn=admin,dc=test,dc=com');

&nbsp; &nbsp;Save and close the file

Step-7: sudo apt-get install gnutls-bin ssl-cert

Step-8: To create CA Template

&nbsp; &nbsp; &nbsp;sudo mkdir /etc/ssl/templates

&nbsp; &nbsp; &nbsp;cn = LDAP Server CA

&nbsp; &nbsp; &nbsp;ca

&nbsp; &nbsp; &nbsp;cert\_signing\_key

Step-9: Create the LDAP Service Template

&nbsp; &nbsp; &nbsp;sudo nano /etc/ssl/templates/ldap\_server.conf

&nbsp; &nbsp; &nbsp;organization = "MyCOMPANY"

&nbsp; &nbsp; &nbsp;cn = myldap.test.com

&nbsp; &nbsp; &nbsp;tls\_www\_server

&nbsp; &nbsp; &nbsp;encryption\_key

&nbsp; &nbsp; &nbsp;signing\_key

&nbsp; &nbsp; &nbsp;expiration\_days = 3652

Step-10: Create CA Key and Certificate

&nbsp; &nbsp;- sudo certtool -p --outfile /etc/ssl/private/ca\_server.key  
&nbsp; &nbsp;- sudo certtool -s --load-privkey /etc/ssl/private/ca\_server.key --template /etc/ssl/templates/ca\_server.conf --outfile /etc/ssl/certs/ca\_server.pem  
  
Step-11: Create Service Key and Certificate  
&nbsp; &nbsp;- sudo certtool -p --sec-param high --outfile /etc/ssl/private/ldap\_server.key  
&nbsp; &nbsp;- sudo certtool -c --load-privkey /etc/ssl/private/ldap\_server.key --load-ca-certificate /etc/ssl/certs/ca\_server.pem --load-ca-privkey /etc/ssl/private/ca\_server.key --template /etc/ssl/templates/ldap\_server.conf --outfile /etc/ssl/certs/ldap\_server.pem  
  
Step-12: sudo usermod -aG ssl-cert openldap  
Step-13: sudo chown :ssl-cert /etc/ssl/private/ldap\_server.key  
Step-14: sudo chmod 640 /etc/ssl/private/ldap\_server.key  
Step-15: Configuring LDAP to use the CA and Keys  
&nbsp; &nbsp; nano addcerts.ldif

&nbsp; &nbsp; dn: cn=config

&nbsp; &nbsp; changetype: modify

&nbsp; &nbsp; add: olcTLSCACertificateFile

&nbsp; &nbsp; olcTLSCACertificateFile: /etc/ssl/certs/ca\_server.pem

&nbsp; &nbsp; -

&nbsp; &nbsp; add: olcTLSCertificateFile

&nbsp; &nbsp; olcTLSCertificateFile: /etc/ssl/certs/ldap\_server.pem

&nbsp; &nbsp; -

&nbsp; &nbsp; add: olcTLSCertificateKeyFile

&nbsp; &nbsp; olcTLSCertificateKeyFile: /etc/ssl/private/ldap\_server.key

Step-16: sudo ldapmodify -H ldapi:// -Y EXTERNAL -f addcerts.ldif

Step-17: sudo service slapd force-reload  
Step1-18: sudo cp /etc/ssl/certs/ca\_server.pem /etc/ldap/ca\_certs.pem  
Step-19: sudo nano /etc/ldap/ldap.conf

&nbsp; &nbsp; . . .

&nbsp; &nbsp; TLS\_CACERT /etc/ldap/ca\_certs.pem

&nbsp; &nbsp; . . .

&nbsp; &nbsp; Save and close the File

Step-20: ldapwhoami -H ldap:// -x -ZZ

Step-21: Lastly check&nbsp;/etc/default/slapd&nbsp;and make sure services contains&nbsp;ldaps:///:

&nbsp; &nbsp; &nbsp; SLAPD\_SERVICES="ldap:/// ldapi:/// ldaps:///"

&nbsp; &nbsp; &nbsp; Restart slapd services  
  
**4.** &nbsp; **Log Into the Web Interface**

&nbsp;Step-1: User can log in to Web Interface by using  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;- domain\_name\_or\_IP\_address/phpldapadmin &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;

![LDAP main Page.png](https://d1okf4ta8xniw3.cloudfront.net/original/1X/ed6dcdf39cc666a31a884b503e1cde634a589318.png "LDAP main Page.png")  
  
Step-2: Click Login and enter Login DN and Password used while configurating LDAP setup.  
  
 ![Login Page.png](https://d1okf4ta8xniw3.cloudfront.net/original/1X/f76f61416f0ee7234c429ee641333e4b76d36729.png "Login Page.png")  
  
Step-3: After logging in Create OU, Groups and Users  
  
 ![DC domain.png](https://d1okf4ta8xniw3.cloudfront.net/original/1X/897d576c354efef5620a3199886d834cbeff5eee.png "DC domain.png")  
  
Step-4: Create Organizational Units  
&nbsp; Select the specific dc name where the users will be created and click on “Create a child entry”, then select the Generic: Organisational Unit&nbsp;

 ![OU creation.png](https://d1okf4ta8xniw3.cloudfront.net/original/1X/a7b5d51f3327afe38bcb4872f98fed48ed79221c.png "OU creation.png") ![OU name.png](https://d1okf4ta8xniw3.cloudfront.net/original/1X/69a696e14c1a504702d74aed13bafbfba02c09c2.png "OU name.png")  
  
Step-5: Create Groups&nbsp;  
&nbsp; Select OU and click on **Create a child entry** , then select **Generic: Posix Group** &nbsp;  
 ![Groups.png](https://d1okf4ta8xniw3.cloudfront.net/original/1X/35edda67a6f0baa107f1d0723378e7775bc2a645.png "Groups.png")  
 ![Group Name save.png](https://d1okf4ta8xniw3.cloudfront.net/original/1X/41d91a00a6e2f0b3b64a20e16ed0cbff11e2d364.png "Group Name save.png")  
  
Step-6: Create Users&nbsp;  
&nbsp; Select **User Group** created and click on **Create a child entry** , then select **Generic: User&nbsp; &nbsp; Account**  
&nbsp; Click on **“Create Object”** and then **“Commit”** to save the settings.

 ![Users Creation.png](https://d1okf4ta8xniw3.cloudfront.net/original/1X/22ef953033306d23ee1f266a58645b74d1e47b70.png "Users Creation.png")

![User Save.png](https://d1okf4ta8xniw3.cloudfront.net/original/1X/766eae5b48e319008f1a0b6515be0943c40c1eea.png "User Save.png")

Step-7: Add a new attribute for users to support as per the “Roles” defined in the cnMaestro&nbsp;  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Click on “ **Add new attribute** ”, select employee type and enter the role attribute which matches the cnMaestro configuration.

 ![User done.png](https://d1okf4ta8xniw3.cloudfront.net/original/1X/04351973fcc9ddc185204f488ab47bb943a4ec28.png "User done.png")  
 ![Employee Name.png](https://d1okf4ta8xniw3.cloudfront.net/original/1X/9a232450f84706ea6a09d676cad44363694bf17c.png "Employee Name.png")  
Note: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  
&nbsp; &nbsp; Value in employeeType should match with the one of the Role Mappings of cnMaestro&nbsp;  
&nbsp;

![LDAP with Role.png](https://d1okf4ta8xniw3.cloudfront.net/original/1X/6498548459dba89f4ed841ab532f19b1f357ee29.png "LDAP with Role.png")  
Note:&nbsp; &nbsp; &nbsp; &nbsp;  
&nbsp; &nbsp; Existing LDAP setup users can add a new custom attribute employeeType and configure the values as per cnMaestro Role mappings values.&nbsp;  
  
**5.&nbsp;Configure cnMaestro** &nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Navigate to **Application \> Users \> Authentication Servers** in the cnMaestro On-Premises UI to add the LDAP Server details.

&nbsp; ![CnMaestro Config.png](https://d1okf4ta8xniw3.cloudfront.net/original/1X/dbb748b6ab2355aba785b043a2d5902049042fe3.png "CnMaestro Config.png")  
  
&nbsp; &nbsp; - Make sure the **_IP Address/Hostname_** field value is the FQDN of LDAP server

&nbsp; &nbsp; - Suffix is the distinguished Name of LDAP server in dc=xyz, dc=xyz format.  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Example: dc=camnwk and dc=com&nbsp;  
&nbsp; &nbsp; - Base DN is login DN in cn=admin, dc=xyz, dc=xyx format  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Example: cn=admin, dc=camnwk and dc=com  
 ![Base-DN.JPG](https://d1okf4ta8xniw3.cloudfront.net/original/1X/f44454a9d6fcfb6d7dd99a859a5922e2acdf14e2.jpeg "Base-DN.JPG")  
&nbsp; &nbsp; - LDAP Password is server password configured during installation.  
&nbsp; &nbsp; - Enable SSL/TLS and upload the root certificate.  
&nbsp; &nbsp; - The employeeType field must be configured according to role-mappings in cnMaestro configuration authentication configuration page and vice versa.

&nbsp; &nbsp; - Navigate to **Application \> Users \> Authentication** and set the **Primary Authentication** to be the LDAP server just created.  
**&nbsp; &nbsp; - Secondary Authentication** will be automatically set to Local Users, which means if the LDAP server is not reachable, the UI can be accessed using the Local Users database (so it is important to change the default password).

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - If you are unable to log into the UI, you can create a One-Time password in the CLI in order to resolve the issue. (See the User Guide for details on **Application Account Recovery** ).  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Here is the link to download the user guide:

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;[https://support.cambiumnetworks.com/files/cnmaestro/](https://support.cambiumnetworks.com/files/cnmaestro/)

&nbsp;

6.&nbsp; **Log into cnMaestro**

- Open a new browser and log into cnMaestro using the new username and password.  
Login should work without any issue for the new user created.

---

<div class="post-metadata">

### Author: ![Antonio\_Bartolini](https://d10gw3vjmzyp8.cloudfront.net/letter_avatar_proxy/v4/letter/a/a183cd/32.png) [@Antonio\_Bartolini](https://community.cambiumnetworks.com/u/Antonio_Bartolini)
#### Post date: [April 10, 2019, 7:13am UTC](https://community.cambiumnetworks.com/t/integrating-open-ldap-with-cnmaestro/61162/2 "2019-04-10T07:13:36Z")

</div>

Great Guide!

---

<div class="post-metadata">

### Author: ![innova](https://d10gw3vjmzyp8.cloudfront.net/letter_avatar_proxy/v4/letter/i/edb3f5/32.png) [@innova](https://community.cambiumnetworks.com/u/innova)
#### Post date: [March 16, 2021, 7:45am UTC](https://community.cambiumnetworks.com/t/integrating-open-ldap-with-cnmaestro/61162/3 "2021-03-16T07:45:26Z")

</div>

Is it possible to implement LDAP search filters?  
That is to limit to only specific AD groups can login (with “memberOf”).

I think currently the only distinction is by “employeeType”.  
But I cannot have 2 cnMaestro instances with different role on each for a user.

---

<div class="post-metadata">

### Author: ![Dlahiru](https://d10gw3vjmzyp8.cloudfront.net/letter_avatar_proxy/v4/letter/d/7993a0/32.png) [@Dlahiru](https://community.cambiumnetworks.com/u/Dlahiru)
#### Post date: [November 9, 2021, 9:54am UTC](https://community.cambiumnetworks.com/t/integrating-open-ldap-with-cnmaestro/61162/4 "2021-11-09T09:54:08Z")

</div>

does LDAP support at essential version ?

---

<div class="post-metadata">

### Author: ![Support\_Kumar](https://d10gw3vjmzyp8.cloudfront.net/user_avatar/community.cambiumnetworks.com/support_kumar/32/11547_2.png) [@Support\_Kumar](https://community.cambiumnetworks.com/u/Support_Kumar)
#### Post date: [November 9, 2021, 10:06am UTC](https://community.cambiumnetworks.com/t/integrating-open-ldap-with-cnmaestro/61162/5 "2021-11-09T10:06:05Z")

</div>

@Dlahiru

Yes, it does support essential version.

---

<div class="post-metadata">

### Author: ![Dlahiru](https://d10gw3vjmzyp8.cloudfront.net/letter_avatar_proxy/v4/letter/d/7993a0/32.png) [@Dlahiru](https://community.cambiumnetworks.com/u/Dlahiru)
#### Post date: [November 11, 2021, 7:38am UTC](https://community.cambiumnetworks.com/t/integrating-open-ldap-with-cnmaestro/61162/6 "2021-11-11T07:38:42Z")

</div>

Thanks , local user creation restricted with \_ character , AD user format unable to change ?
