LDAP Setup Breaks Login Page - Netbox 2.8

311 views
Skip to first unread message

owup

unread,
Oct 6, 2021, 12:40:31 PM10/6/21
to NetBox
Hey everyone,
Does anyone have experience w/ LDAP setup and Netbox 2.8?
I get the following error when attempting to login (remotely or locally):

The complete exception is provided below:

<class 'ModuleNotFoundError'>
No module named 'netbox.authentication'

In configuration.py - if I change REMOTE_AUTH_BACKEND to utilities.auth_backends.RemoteUserBackend (documentation says to use: REMOTE_AUTH_BACKEND = 'netbox.authentication.LDAPBackend') - I can login locally but for LDAP users, I get the error:

Errors
  • Please enter a correct username and password. Note that both fields may be case-sensitive.
Any guidance?

Brian Candler

unread,
Oct 6, 2021, 2:27:04 PM10/6/21
to NetBox
RemoteUserBackend is not LDAP: it's when the upstream proxy does authentication and supplies the identity via HTTP headers.

The problem might be that you're reading the docs for Netbox 3.0 but trying to apply them to 2.8.  Try reading the raw docs in git for 2.8.x.  The LDAP page is here.

Note that you shouldn't need to change anything in configuration.py to use LDAP: the presence of ldap_config.py is what triggers it.  Leave all the REMOTE_AUTH settings as they were.

owup

unread,
Oct 6, 2021, 3:46:52 PM10/6/21
to NetBox
How do I mark this as solved?!! Thank you, Brian, the Raw Docs in git worked w/o incident. 
Now to work on upgrading! Thanks again. 

Brian Candler

unread,
Oct 7, 2021, 3:43:41 AM10/7/21
to NetBox
On Wednesday, 6 October 2021 at 20:46:52 UTC+1 owup wrote:
How do I mark this as solved?

You just have :-)

There is a newer forum using Github Discussions at https://github.com/netbox-community/netbox/discussions

It allows questions to be marked as 'Answered', as well as making it easier to link to issues.  This google group may be retired at some point.
Reply all
Reply to author
Forward
0 new messages