Description of problem: LDAPI code uses nsslapd-ldapimaprootdn to map Unix root entry to a Root DN entry. It usually has the same value as nsslapd-rootdn. Changing one attribute but not changing the other leads to a non-functional autobind configuration that breaks dsconf and WebUI. LDAPI code should use nsslapd-rootdn value instead of having two separate entries that should be kept in sync. This should make changing Root DN simpler and without fear that it will break dsconf or WebUI access. See https://bugzilla.redhat.com/show_bug.cgi?id=2127795 for context.
Build tested: 389-ds-base-2.3.4-2.el9.x86_64 [1] dsconf changes only nsslapd-rootdn when RootDN is updated (previously both nsslapd-rootdn and nsslapd-ldapimaprootdn were changed): # dsconf -D cn=Directory\ Manager ldap://localhost config replace nsslapd-rootdn="cn=admin" Enter password for cn=Directory Manager on ldap://localhost: Successfully replaced "nsslapd-rootdn" [2] When nsslapd-ldapimaprootdn is updated, dsconf logs a message: # dsconf -D cn=Directory\ Manager ldap://localhost config replace nsslapd-ldapimaprootdn="cn=admin" Enter password for cn=Directory Manager on ldap://localhost: Successfully replaced "nsslapd-ldapimaprootdn" The "nsslapd-ldapimaprootdn" setting is obsolete and kept for compatibility reasons. For LDAPI configuration, "nsslapd-rootdn" is used instead And in the errors log: [28/Jul/2023:03:54:30.718130078 -0400] - WARN - config_set_ldapi_root_dn - The "nsslapd-ldapimaprootdn" setting is obsolete and kept for compatibility reasons. For LDAPI configuration, "nsslapd-rootdn" is used instead. In cn=config new value is also present: # ldapsearch -LLL -D cn=Directory\ Manager -w password -H ldap://localhost -s base -b cn=config nsslapd-rootdn nsslapd-ldapimaprootdn dn: cn=config nsslapd-rootdn: cn=Directory Manager nsslapd-ldapimaprootdn: cn=admin And autobind continues to work, since nsslapd-rootdn is now used, instead of nsslapd-ldapimaprootdn # dsconf localhost backend suffix list dc=example,dc=com (userroot) # echo $? 0 [28/Jul/2023:04:08:03.981381558 -0400] conn=14 fd=64 slot=64 connection from local to /run/slapd-localhost.socket [28/Jul/2023:04:08:03.985945222 -0400] conn=14 AUTOBIND dn="cn=Directory Manager" [28/Jul/2023:04:08:03.987695893 -0400] conn=14 op=0 BIND dn="cn=Directory Manager" method=sasl version=3 mech=EXTERNAL Marking as Verified:Tested