Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://889802]
help
Chatterbox?
[Corion]: Eily: Yeah - my French isn't even good to understand jokes, much less to make them :-D
[Corion]: marto: That post is a repost/duplicate of Excel sheet data write issue :-D
[Corion]: Whoops - Merging worksheets in .xls in one Excel sheet
[marto]: Corion, whoops, can the moderation me amended?
[Corion]: marto: We could vote, unconsider and reconsider ;)
[Corion]: "vote keep", I meant ;)
[Corion]: marto: But that aside, I hope you are well!
Corion is slowly acclimatizing to working only four days a week
[marto]: the back pain is still there, it's been a rough week, trying to do building work with a bad back
[Corion]: marto: Ow! That doesn't sound good :-/ The work won't help your back...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (10)
As of 2017-09-21 14:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (248 votes). Check out past polls.

    Notices?