You're not going to get to that kind of stuff anonymously. You'll need not only authenticated access, but also administrative access (use authentication string that looks something like this: "cn=<userid>,dc=<domain>,cn=admin"). Plus, you'll need to use the Configuration container as the base, at the very least.
Rick -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 01, 2003 6:25 AM To: [EMAIL PROTECTED] Subject: can't get a list of X400 connectors Hi, i try to get the list of the X400 connectors in my exchange 5.5 site by using perl-ldap but i do not retrieve anything. Do you have an idea ? Here is the code : #!/usr/bin/perl -w use Net::LDAP; $ldap = Net::LDAP->new('sgnetex7') or die "$@"; $ldap->bind ; # an anonymous bind $mesg = $ldap->search ( # perform a search base => "o=SAINT-GOBAIN", scope => 'sub', filter => "(objectClass=RFC1006-X400-Link)" ); $mesg->code && die $mesg->error; my $max = $mesg->count; print "$max"; for( my $index = 0 ; $index < $max ; $index++) { my $entry = $mesg->entry($index); my $dn = $entry->dn; # Obtain DN of this entry @attrs = $entry->attributes; # Obtain attributes for this entry. foreach my $var (@attrs) { #get a list of values for a given attribute $attr = $entry->get_value( $var, asref => 1 ); if ( defined($attr) ) { foreach my $value ( @$attr ) { print "$var: $value\n"; # Print each value for the attribute. } } } } $ldap->unbind; # take down session exit 0; Thanks for your help, St�phane
