For Programmers: Free Programming Magazines  


Home > Archive > LDAP > April 2005 > Ldap to AD









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Ldap to AD
Chris Padilla

2005-04-20, 9:01 pm

Hi guys/gals, I was wondering if you've ever written a program that
iterates through a multivalued field like proxyaddresses.

------------------------------------------------------------------------
------ (Start of file)
-----------------------------------------------------------------
#!/usr/local/bin/perl -w

use Net::LDAP;
# Set the active directory string to server.
$ad = Net::LDAP->new('172.16.126.247') or die "Could not connect to LDAP
server";

$address="019232\@avnet.com";
# Clean up the address...
$address =~ s/\@/\\\@/;
print "Address to check $address\n\n";

# Bind to the Active directory with this generic account
$ad-> bind('CN=sysxfer,ou=sys,ou=GLBMSG,DC=avn
et,DC=com',
password => 'Avnet!00'
);

#---- Interact with the Directory server here
####### Need to pull proxyAddresses and iterate through them to find
$address.


#-----

# Disconnect from the Active Directory Object.
$ad->unbind;
------------------------------------------------------------------------
------ (End of file)
-----------------------------------------------------------------


Thanks,
Chris Padilla

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com