After configuring LDAP in Jenkins, it is impossible to log in using the default administrator user "admin".

After I configured the authentication source as LDAP in Jenkins, the default administrator user “admin” was unable to log in. I needed to edit the config.xml and modify it as follows:

<useSecurity>false</useSecurity>

How should this problem be solved? I want the default “admin” user to still have administrator privileges and be able to log in, while other users can log in through LDAP.

When you install LDAP, all users must be in ldap. There is no local users anymore. You need to grant one or more users admin permissions and use them for administration of Jenkins.
Other plugins might provide some kind of fallback user, e.g. Active Directory plugin, but not the ldap plugin to my knowledge.

Thank you very much for your reply. I will try to operate it. Because I have always manually created users when using Jenkins before and did not use Jenkins to integrate LDAP. This time I need to use LDAP, so I discovered this problem. Thank you.