|
@@ -36,7 +36,13 @@ Once installed, add the package to `local_requirements.txt` to ensure it is re-i
|
|
|
|
|
|
|
|
## Configuration
|
|
## Configuration
|
|
|
|
|
|
|
|
-Create a file in the same directory as `configuration.py` (typically `netbox/netbox/`) named `ldap_config.py`. Define all of the parameters required below in `ldap_config.py`. Complete documentation of all `django-auth-ldap` configuration options is included in the project's [official documentation](http://django-auth-ldap.readthedocs.io/).
|
|
|
|
|
|
|
+First, enable the LDAP authentication backend in `configuration.py`. (Be sure to overwrite this definition if it is already set to `RemoteUserBackend`.)
|
|
|
|
|
+
|
|
|
|
|
+```python
|
|
|
|
|
+REMOTE_AUTH_BACKEND = 'netbox.authentication.LDAPBackend'
|
|
|
|
|
+```
|
|
|
|
|
+
|
|
|
|
|
+Next, create a file in the same directory as `configuration.py` (typically `netbox/netbox/`) named `ldap_config.py`. Define all of the parameters required below in `ldap_config.py`. Complete documentation of all `django-auth-ldap` configuration options is included in the project's [official documentation](http://django-auth-ldap.readthedocs.io/).
|
|
|
|
|
|
|
|
### General Server Configuration
|
|
### General Server Configuration
|
|
|
|
|
|
|
@@ -145,7 +151,8 @@ logfile = "/opt/netbox/logs/django-ldap-debug.log"
|
|
|
my_logger = logging.getLogger('django_auth_ldap')
|
|
my_logger = logging.getLogger('django_auth_ldap')
|
|
|
my_logger.setLevel(logging.DEBUG)
|
|
my_logger.setLevel(logging.DEBUG)
|
|
|
handler = logging.handlers.RotatingFileHandler(
|
|
handler = logging.handlers.RotatingFileHandler(
|
|
|
- logfile, maxBytes=1024 * 500, backupCount=5)
|
|
|
|
|
|
|
+ logfile, maxBytes=1024 * 500, backupCount=5
|
|
|
|
|
+)
|
|
|
my_logger.addHandler(handler)
|
|
my_logger.addHandler(handler)
|
|
|
```
|
|
```
|
|
|
|
|
|