Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: Active Directory DC and OU

by strat (Canon)
on Apr 19, 2006 at 08:04 UTC ( #544284=note: print w/ replies, xml ) Need Help??


in reply to Re: Active Directory DC and OU
in thread Active Directory DC and OU

If you just want to query ActiveDirectory, Net::LDAP is fine. But for writing, AD seems to have a problem with non-ASCII characters because (except within the distinguishedName) utf-8 is not used and Net::LDAP in version3 insists on writing utf-8.

  • either use Encode to iso-8859-1 and use Net::LDAP version2, e.g.
    my $ldap = Net::LDAP->new($hostname, version => 2) or die "Error: can't connect to '$hostname'";
  • or Win32::AD::User which is good for adding and editing users but doesn't support searches
  • or use pure Win32::OLE (that's the way I prefer). Argel postet some very good links below.

Best regards,
perl -e "s>>*F>e=>y)\*martinF)stronat)=>print,print v8.8.8.32.11.32"


Comment on Re^2: Active Directory DC and OU
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://544284]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (12)
As of 2014-09-19 08:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (133 votes), past polls