Try to set up LDAP access. I get the following error.
There was a problem with your request. Please contact an administrator.
The complete exception is provided below:
<class 'django.core.exceptions.ImproperlyConfigured'>
LDAP authentication has been configured, but django-auth-ldap is not installed.
Python version: 3.8.5
NetBox version: 2.9.11
But I do install the django-auth-ldap module, following the instructions.
source /opt/netbox/venv/bin/activate
pip3 install django-auth-ldap
The only error I got was if I used "pip3 install django-auth-ldap"
.....
Installing collected packages: pyasn1, pyasn1-modules, python-ldap, django-auth-ldap
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/opt/netbox-2.9.11/venv/lib/python3.8/site-packages/pyasn1'
Consider using the `--user` option or check the permissions.
but I used "sudo pip3 install django-auth-ldap", I do not get any error.
(venv) xuan@fre-netbox-2:/opt/netbox/netbox/netbox$ sudo pip3 install django-auth-ldap
Requirement already satisfied: django-auth-ldap in /usr/local/lib/python3.8/dist-packages (2.2.0)
Requirement already satisfied: Django>=1.11 in /usr/local/lib/python3.8/dist-packages (from django-auth-ldap) (3.1.5)
Requirement already satisfied: python-ldap>=3.1 in /usr/local/lib/python3.8/dist-packages (from django-auth-ldap) (3.3.1)
Requirement already satisfied: asgiref<4,>=3.2.10 in /usr/local/lib/python3.8/dist-packages (from Django>=1.11->django-auth-ldap) (3.3.1)
Requirement already satisfied: pytz in /usr/local/lib/python3.8/dist-packages (from Django>=1.11->django-auth-ldap) (2020.5)
Requirement already satisfied: sqlparse>=0.2.2 in /usr/local/lib/python3.8/dist-packages (from Django>=1.11->django-auth-ldap) (0.4.1)
Requirement already satisfied: pyasn1>=0.3.7 in /usr/lib/python3/dist-packages (from python-ldap>=3.1->django-auth-ldap) (0.4.2)
Requirement already satisfied: pyasn1-modules>=0.1.5 in /usr/lib/python3/dist-packages (from python-ldap>=3.1->django-auth-ldap) (0.2.1)
How to fix this issue ?
Thanks a lot