[Check_mk (english)] LDAP problem with role and contact group assignment for users that have accents in their name in AD

Róbert Lányi lanyi.robert.attila at gmail.com
Wed Aug 23 23:07:59 CEST 2017


Hey there,

running Check_MK version 1.4.0p9 with LDAP integration and distributed
monitoring. If users have accents in their name (that is the name shown in
the list in Active Directory Users and Computers and in the Alias column in
Check_MK), the following problems occur:

- lowercase accented characters (like áéíóöőúüű): the roles that are coming
from LDAP are not assigned to user, only the default role (configured in
WATO / Global  Settings / User Management / Default user profile) is set
(but contact groups are synced just fine)
- uppercase accented characters (like ÁÉÍÓÖŐÚÜŰ): the problem above + also
the contact groups that are coming from LDAP are not assigned

None of these problems occur when the name of the user contains only
alphanumeric characters.

Please note that both problems also occur if you set a custom field to use
for the Alias field with the *LDAP attribute to sync* option in WATO.

I realized that back then this was working, and comparing
share/check_mk/web/plugins/userdb/ldap.py in 1.2.8p20 with 1.4.0p9 shows
the following difference (among others):

470c471
<                         result.append((dn.lower(), new_obj))
---
>                         result.append((dn.lower().decode('utf-8'),
new_obj))

When I rollback this line and restart the monitoring site, the LDAP user
sync works as expected, roles and contact groups are set correctly.

Hope this helps someone.

Best,
Robert.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mathias-kettner.de/pipermail/checkmk-en/attachments/20170823/1d8a5e4c/attachment.html>


More information about the checkmk-en mailing list