ldap3.core.exceptions.LDAPKeyError: "key 'samaccountname' not found"

I recently install ERPNext using the guide here Install v13 Production on Ubuntu 20.04 VPS - This is how I did it "Easy Install" script

I was able to successfully install it, configure my domain, email(got an automated email today) and even able to configure LDAP with AD. however, it gets stuck on verifying… when I checked the Firefox console I saw this error:

Traceback (most recent call last):
File “/home/admin/frappe-bench/apps/frappe/frappe/app.py”, line 65, in application
response = frappe.handler.handle()
File “/home/admin/frappe-bench/apps/frappe/frappe/handler.py”, line 31, in handle
data = execute_cmd(cmd)
File “/home/admin/frappe-bench/apps/frappe/frappe/handler.py”, line 67, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/admin/frappe-bench/apps/frappe/frappe/init.py”, line 1174, in call
return fn(*args, **newargs)
File “/home/admin/frappe-bench/apps/frappe/frappe/integrations/doctype/ldap_settings/ldap_settings.py”, line 237, in login
user = ldap.authenticate(frappe.as_unicode(args.usr), frappe.as_unicode(args.pwd))
File “/home/admin/frappe-bench/apps/frappe/frappe/integrations/doctype/ldap_settings/ldap_settings.py”, line 169, in authenticate
return self.create_or_update_user(self.convert_ldap_entry_to_dict(user), groups=groups)
File “/home/admin/frappe-bench/apps/frappe/frappe/integrations/doctype/ldap_settings/ldap_settings.py”, line 209, in convert_ldap_entry_to_dict
‘username’: user_entry[self.ldap_username_field].value,
File “/home/admin/frappe-bench/env/lib/python3.8/site-packages/ldap3/abstract/entry.py”, line 250, in getitem
raise LDAPKeyError(error_message)
ldap3.core.exceptions.LDAPKeyError: “key ‘samaccountname’ not found”

When I provide invalid credentials, I immediately get the incorrect credential error message. This happens only when I provide correct credentials. The user I’m tying to log in has been mapped to below group

Consider me a noob in linux! :smiley: installed on Ubuntu 20.04

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.