Maybe I asked in the wrong place, however (for those who will make a similar search) I post the answer I found from another part: https://serverfault.com/questions/549961/ldap-distinguished-name-validator
Ldap Domain Name validator
-
02-07-2022 - |
题
I want to create a validator for dn of an ldap, I mean that if I get as input a string from user, my regex, program, library (whatever works) can tell me if string inserted is a ldap dn or not, can You help me??
解决方案
其他提示
LDAP C API has a function for DN parsing that is called ldap_explode_dn
. There are also many bindings for different languages (PHP, python, etc.). I suggest you consider using this API as a DN validation tool.
不隶属于 StackOverflow