The article describes how to resolve the 'Internal Server Error 500' error when creating a local user after deleting another user when LDAP service auto-provisioning is enabled.
FortiAuthenticator v6.6.7.
In this scenario, when creating a new local user, the user receives 'Internal Server Error 500'.
GUI logs show the following error:
File "/lib/python3.13/site-packages/django/contrib/auth/admin.py", line 147, in _add_view
return super().add_view(request, form_url, extra_context)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "./fac/fac/common/admin.py", line 276, in add_view
File "./fac/fac/common/admin.py", line 98, in add_view
File "/lib/python3.13/site-packages/django/contrib/admin/options.py", line 1886, in add_view
return self.changeform_view(request, None, form_url, extra_context)
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lib/python3.13/site-packages/django/utils/decorators.py", line 46, in _wrapper
return bound_method(*args, **kwargs)
File "/lib/python3.13/site-packages/django/utils/decorators.py", line 134, in _wrapper_view
response = view_func(request, *args, **kwargs)
File "/lib/python3.13/site-packages/django/contrib/admin/options.py", line 1747, in changeform_view
return self._changeform_view(request, object_id, form_url, extra_context)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lib/python3.13/site-packages/django/contrib/admin/options.py", line 1805, in _changeform_view
return self.response_add(request, new_object)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "./fac/fac/apps/local_user/admin/auth_user.py", line 384, in response_add
File "./fac/fac/apps/fac_auth/utils.py", line 1386, in map_local_user_to_fac_ldap
ValueError: too many values to unpack (expected 2)
The issue occurs when the following option is enabled: LDAP Tree Menu -> General -> LDAP User Auto Provisioning -> Auto provision users into LDAP from the following sources -> GUI (Manually created local users).
This behaviour is tracked as a known issue (ID 1205032) in v6.6.7.
As a workaround, disable Auto-provision users into LDAP from the following sources: GUI (Manually created local users) to resolve the error in v6.6.7.
However, the known issue has been fixed in FortiAuthenticator v6.6.8.
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.