Netbox LDAP Link

Hey all

To help other people here’s the trick of how to implement LDAP Login for Netbox with an UCS Server:

  1. Follow the instructions of Netbox Authentication - NetBox Documentation
  2. Change in the ldap_config.py file following lines:

at the beginning of the file:
from django_auth_ldap.config import LDAPSearch, PosixGroupType

towards the end of the file:
AUTH_LDAP_GROUP_TYPE = PosixGroupType()

Your LDAP Login will work now :slight_smile:

3 Likes

Finally a working solution - i attempted to get this working for hours beforee giving up - a quick search today your post appears !

Works perfectly!

1 Like

Thanks!

@xtomiff Might you provide a complete example of the ldap_config.py?
I am struggeling with the values of AUTH_LDAP_BIND_DN and PASSWORD…
Also unsure about AUTH_LDAP_SERVER_URI, is this ldaps://ucs.example.com:7636

Sorry for being off-topic but might help someone else?

Thanks,
Christian

// Server URI
AUTH_LDAP_SERVER_URI = “ldap://your-server-ip:7389”

// Set the DN and password for the NetBox service account.
AUTH_LDAP_BASE_DN = "dc=domain,dc=ending“
AUTH_LDAP_BIND_DN = "uid=ldap-user,cn=users,dc=domain,dc=ending“
AUTH_LDAP_BIND_PASSWORD = "funkypassword“

In your domain example.com
domain is “example”
ending is “com”
so the BASE_DN is “dc=example,dc=com”

It’s recommended to create a ldap-user with only read-rights on your AD directory and use this user to search the ldap records.

Mastodon