From: Neil B. <NB...@ab...> - 2000-05-22 16:38:42
|
Neil Here again, For some reason, I can't access the Extension-Attribute-1 of the Exchange Server or any of these attributes with perl-ldap. I'm wondering if the author followed the requirements to make it work with the Exchange Server or he/she just did enough, to make it work with Netscape Servers. Here are the attributes that are invisible to the perl-ldap.0.17 Net::LDAP module. [Exchange Server Attributes] Hide-From-Address-Book mailPreferenceOption Extension-Attribute-1 Extension-Attribute-10 Extension-Attribute-11 Extension-Attribute-12 Extension-Attribute-13 Extension-Attribute-14 Extension-Attribute-15 Extension-Attribute-2 Extension-Attribute-3 Extension-Attribute-4 Extension-Attribute-5 Extension-Attribute-6 Extension-Attribute-7 Extension-Attribute-8 Extension-Attribute-9 Extension-Name Home-MTA Telephone-Assistant Telephone-Home2 memberOf Here is the code that I am using. use strict; use Net::LDAP; use Net::LDAP::Constant qw( LDAP_COMPARE_TRUE LDAP_COMPARE_FALSE ); my $ldap = Net::LDAP->new('10.2.0.200',port=>389) or die "$@"; $ldap->bind; #an anonymous bind my $mesg = $ldap->search ( # perform a search base => "o=\"Miningco.com, Inc.\",c=us", filter => "(&(cn=neil*)(sn=*))", # attrs =>'Extension-Attribute-1' ); $ldap->debug(3); $mesg->code && die $mesg->error; my $entry; my $ictr; foreach $entry ($mesg->all_entries) { $entry->dump; $ictr++ } $ldap->unbind; # take down session print $ictr; |