Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: List Microsoft AD users with perl on Linux (active and inactive users)

by Sinistral (Prior)
on Feb 23, 2011 at 15:16 UTC ( #889802=note: print w/replies, xml ) Need Help??

in reply to List Microsoft AD users with perl on Linux (active and inactive users)

As viveksnv so helpfully points out, the LDAP interfaces in Perl are many and varied, with Net::LDAP leading the pack. However, it sounds like you are wanting more fundamental information, namely, "how do I query Active Directory using LDAP (and you're using ldapsearch command, not a Perl API)". That information seems to be carefully explained in an article in the "Hey, Scripting Guy!" blog on TechNet. Although that example uses Windows command line scripting (which if you're actually working with Active Directory you should be doing anyway, using the Microsoft tools that make such things easier than raw LDAP), it's easy enough to figure out the filters and proper values to query for. I also found an article describing how to use dsquery to do the same thing. If you're working with a newer A/D installation, you should check out Active Directory Administration using PowerShell from the folks at Microsoft. After all, they did create the system.

Update: Read your request too quickly, now see the very important from Linux in your post. Sorry about that. You can still use the Scripting Guy information to help you, though.

  • Comment on Re: List Microsoft AD users with perl on Linux (active and inactive users)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://889802]
[vedagiri89]: that is what i can't getting solution
[vedagiri89]: recently purchased centos server and doing migration of app
[choroba]: did you copy any dependencies?
[choroba]: all XS code needs to be recompiled
[vedagiri89]: install perl5.16 in the new server and try to run appache
[hippo]: Which version of CentOS?
[vedagiri89]: how to fix: Attempt to reload aborted
[hippo]: Ah, presumably 7 then.

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2018-06-19 11:27 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (113 votes). Check out past polls.