From: Christoph H. <c.h...@gm...> - 2009-06-02 11:46:49
|
Hi ! >> >> Thanks for your reply and that of Marc Balmer. >> But I still wonder if it is allowed by LDAP or LDIF- >> Specification to have a comma in dn. I also tried it >> with "" and Base64, some of which >> openldap accepted. > > take a look at RFC 1779. A semicolon could be used as an > alternate delimiter and it shuld be possible to enclose strings > in quotes, i.e. like this: > > dn="Balmer, Marc",ou=research,dc=msys,dc=ch > > But I did not test if OpenLDAP "eats" this... ;) > > - Marc Balmer > I just fed it with dn: cn="Lehmann, Veronika",dc=Adressbuch,dc=christoph objectclass: top objectclass: person objectclass: inetOrgPerson objectclass: mozillaAbPersonAlpha sn: Lehmann cn: Lehmann, Veronika it works fine. But the Output of OpenLDAP, when I ldapsearch it is : > ldapsearch -x "(cn=*lehmann*)" # extended LDIF # # LDAPv3 # base <dc=christoph> (default) with scope subtree # filter: (cn=*lehmann*) # requesting: ALL # # Lehmann\2C Veronika, Adressbuch.christoph dn: cn=Lehmann\2C Veronika,dc=Adressbuch,dc=christoph objectClass: top objectClass: person objectClass: inetOrgPerson objectClass: mozillaAbPersonAlpha sn: Lehmann cn: Lehmann, Veronika And what I saw was : escape-codes. And I just have been told, that it's not LDIF-conform ;-) probably they don't know ? So my goal now is to make my filter put entrys which contain commas in "". Does anyone know how to make Python-ldap do so ? C. Holtermann |