Re: PERL and Active DIrectory




gaz_5_m@xxxxxxxxxxx wrote in message-id: <1183058740.045092.304550@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>


Hi folks,

I was just wondering if anyone was using PERL to any great effect to
query Active DIrectory.

I'm in the middle of a fairly large project at work that requires
getting (constantly changing) info from AD. I was doing the same
things on a daily basis so thought it best to try and script it.

Is there any way to directly interrogate AD from within PERL. At the
moment, the only way I have been able to figure out is to use the
Windows Admin Pak to call:

open query, "dsquery group -name "x" | dsget group -members |";

from within the script and then use the piped output of the open
command to strip out the data that I want.

It works OK, just takes a hell of a long time!

The other issue I get is the default return size that is set in our AD
environment, 1000, so groups with any larger than 1000 users return
nothing.

I know you can get round this with VB, but PERL is my language of
choice! :-)

Anyone with any tips?

Yeah you probably want to use Net::LDAP
it is part of the perl-ldap package
btw this will work with all major directory services
Netscape, AD, NDS, and Solaris Directory




.



Relevant Pages

  • 2005-10-23 [de.comp.lang.perl.cgi] FAQ
    ... Programmiersprache Perl in CGI-Scripten. ... Wo gibt es Dokumentation über Perl und CGI? ... Hilfe zum Programm perldoc kann man mit 'perldoc perldoc' ... Mein Script läuft nicht bei meinem Provider. ...
    (de.comp.lang.perl.cgi)
  • 2005-10-23 [de.comp.lang.perl.cgi] FAQ
    ... Programmiersprache Perl in CGI-Scripten. ... Wo gibt es Dokumentation über Perl und CGI? ... Hilfe zum Programm perldoc kann man mit 'perldoc perldoc' ... Mein Script läuft nicht bei meinem Provider. ...
    (de.comp.lang.perl.cgi)
  • 2005-10-23 [de.comp.lang.perl.cgi] FAQ
    ... Programmiersprache Perl in CGI-Scripten. ... Wo gibt es Dokumentation über Perl und CGI? ... Hilfe zum Programm perldoc kann man mit 'perldoc perldoc' ... Mein Script läuft nicht bei meinem Provider. ...
    (de.comp.lang.perl.cgi)
  • 2005-10-23 [de.comp.lang.perl.cgi] FAQ
    ... Programmiersprache Perl in CGI-Scripten. ... Wo gibt es Dokumentation über Perl und CGI? ... Hilfe zum Programm perldoc kann man mit 'perldoc perldoc' ... Mein Script läuft nicht bei meinem Provider. ...
    (de.comp.lang.perl.cgi)
  • 2005-11-20 [de.comp.lang.perl.cgi] FAQ
    ... Programmiersprache Perl in CGI-Scripten. ... Wo gibt es Dokumentation über Perl und CGI? ... Hilfe zum Programm perldoc kann man mit 'perldoc perldoc' ... Mein Script läuft nicht bei meinem Provider. ...
    (de.comp.lang.perl.cgi)