Trouble getting LDAP to work #19237
-
Hi there. Seems LDAP is a frequent issue that comes up. I've searched a good amount and have seen some promising results related to what I'm seeing but haven't seen any solutions posted by those same users who created the discussions in the first place. Currently I have Netbox up and running, superuser can log in, etc. Followed the Netbox Labs guide for all steps up to and including the LDAP config portion and it seems that user logins aren't even getting through to auth/LDAP. I have the logfile created but not seeing anything logged in it despite reloading services, so I can't really even see if LDAP is even working. Any help/tips would be appreciated.
Remote auth code from
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
If you're using a UNIX Based LDAP (like Univention Coroprate Server or UCS) try this:
Obviously you'll need to import the Grouptype at the beginning of the file:
|
Beta Was this translation helpful? Give feedback.
-
We are using Active Directory, I should've said that before. Maybe stupid questions but...the ldap search should be searching AD for the specified user and the groups it belongs to, yes? The AD user specified(logging in) should match the login requirements? As in, the user doesn't need to be created in netbox first before trying to log in? I was able to get logging working though. I've tried changing the
|
Beta Was this translation helpful? Give feedback.
-
I have created a user inside netbox with the same details as my domain user and am still getting the same error as above, except now I'm able to sign in because of that user account; auth lookup/mapping to DN is still failing. Some lines are commented out for testing purposes, but here is an updated version of the
|
Beta Was this translation helpful? Give feedback.
-
Turns out the above config does work. The service account was, by default upon creation, not set to not expire in conjunction with the password being set to expire at next logon in AD. Once those two options were changed and replication occurred, LDAP queries began working. Another user -not me- created this service account and I had assumed they had done it correctly this whole time. Furthermore, when another person I was testing with tried logging in without a pre-created netbox user account, they were immediately let in the first time, as the LDAP query results matched with the netbox access requirements/group memberships that the user was already configured with in AD. Based off of that and upon login, netbox automagically created a user account and adjusted permissions/roles accordingly from the group memberships required as in This is solved for now, thanks for your time. |
Beta Was this translation helpful? Give feedback.
Turns out the above config does work. The service account was, by default upon creation, not set to not expire in conjunction with the password being set to expire at next logon in AD. Once those two options were changed and replication occurred, LDAP queries began working. Another user -not me- created this service account and I had assumed they had done it correctly this whole time.
Furthermore, when another person I was testing with tried logging in without a pre-created netbox user account, they were immediately let in the first time, as the LDAP query results matched with the netbox access requirements/group memberships that the user was already configured with in AD. Based off of th…