I would like to know if it's possible to extract users from Active Directory and parse the output to obtain a XML file with specific format.
So the AD is a windows machine, and I would like to extract from a red hat linux serveur. I try ldapsearch command and ok I'm abble to extract data, but I must change the file to XML special file.
Just one exemple of parsing could be ok...
Thanks a lot
Hello Tony
I do not anderstand your answer...The command you specify.
Well I'll look the perl ldap module,
Maybe some of you have some exemple of code?
If you run the getent commands I have suggested on the Unix client you will get a list of all the users and groups without having to export and munge files on the LDAP server.
It's possible the OP would like to extract Active Directory data that has nothing to do with his/her Linux authentication scheme, perhaps for some other use.
It's possible to pull the data with Perl's Net::LDAP and also with Python. And you don't even need a module to write XML data, though it might be easier if you wanted to write very complex XML.