1 2 3 4 5 6
my $result = $ad->search(base=>$path,filter=>"cn=*",attrs=>"cn"); my $manager = $result->entry(0)->get_value('managedBy'); $result = $ad->search(base=>$manager,filter=>"cn=*",attrs=>"cn"); #print decodeCertSubject($result->entry(0)->get_value('userCertificate')) . "\n"; my ($oneline, $cn) = decodeCertSubject($result->entry(0)->get_value('userCertificate'));
1 2 3 4 5 6 7 8 9
use Data::Dumper; my $result = $ad->search(base=>$path,filter=>"cn=*",attrs=>"cn"); warn Dumper (\$result); my $manager = $result->entry(0)->get_value('managedBy'); warn Dumper (\$manager); $result = $ad->search(base=>$manager,filter=>"cn=*",attrs=>"cn"); #print decodeCertSubject($result->entry(0)->get_value('userCertificate')) . "\n"; my ($oneline, $cn) = decodeCertSubject($result->entry(0)->get_value('userCertificate'));