No real experience with the issue you are having and no way to test at the moment, but I've found that Data::Dumper can be very helpful in determining the data structure being returned. It could be that the LDAP module is converting the entry into an array.
Bart On Jan 13, 2010, at 11:39, "Creason, Kevin (JSC-OH230)[ARES]" <[email protected]> wrote: Is this problem with me/my code? Or am I having a problem with the Net::LDAP module? I appreciate any insights-- I'm querying an active directory group which has more than 1500 members which is apparently the cut-off. When you get 1501 or more members the member list is split into ranges, so the attributes become "member;range=0-1499", and also "member;range=1500-*" up to 2,999 in which case it would advance to "member;range=1500-2999" and "member;range=3000-*". Make sense? Final range is always an asterisk. So here's the output-- I only see one range. The asterisk range is missing. I have verified it really exists using command tools. So it is either something in my syntax (which I don't think is true because I have dumbed this way down) or in the module: # ~kcreason/perl/biggroupdump Att: "cn". Att: "dSCorePropagationData". Att: "description". Att: "distinguishedName". Att: "groupType". Att: "instanceType". Att: "member". Att: "member;range=0-1499". Att: "name". Att: "objectCategory". Att: "objectClass". Att: "objectGUID". Att: "objectSid". Att: "sAMAccountName". Att: "sAMAccountType". Att: "uSNChanged". Att: "uSNCreated". Att: "whenChanged". Att: "whenCreated". Here's my code... use Net::LDAP; my $ad_ldap = Net::LDAP->new('servername'); my $error = $ad_ldap->bind('userprincipalname', password => 'password'); my $group_search = undef; my @members; $group_search = $ad_ldap->search( 'base' => 'the ldap base, is here', 'filter' => "(&(objectClass=group)(samaccountname=GroupName))", 'attrs' => [ '*',alloptions=>1 ] ); die if ($group_search->code); my @entries = $group_search->entries; foreach my $entr (@entries) { foreach my $attr ( sort $entr->attributes) { print "Att: \"$attr\".\n"; } } $ad_ldap->unbind; _______________________________________________ Houston mailing list [email protected] http://mail.pm.org/mailman/listinfo/houston Website: http://houston.pm.org/ _______________________________________________ Houston mailing list [email protected] http://mail.pm.org/mailman/listinfo/houston Website: http://houston.pm.org/
