check correct values for ldap config and fix error message format

Note that there is no changelog update,  because there is already a changelog entry that assumes this was done correctly...