Code Comments
Programming Forum and web based access to our favorite programming groups.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
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.