working with ldap files

flit superflit at gmail.com
Fri Sep 1 09:57:48 EDT 2006


Hello All,

I am struggling with some ldap files.

I am using the csv module to work with this files (I exported the ldap
to a csv file).
I have this string on a field
CN=pointhairedpeoplethatsux,OU=Groups,OU=Hatepeople,OU=HR,DC=fabrika,DC=com;CN=pointhairedboss,OU=Groups,OU=Hatepeople,OU=HR,DC=fabrika,DC=com
this string is all the groups one user has membership.
So what I am trying to do.
read this string
and extract only the CNs

like

pointhairdepeoplethatsux,pointhairedboss

Or think in negative way
remove the OU=****** and DC= ******

Any ideas?




More information about the Python-list mailing list