Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Ldap Group membership

by g0n (Priest)
on May 23, 2005 at 14:10 UTC ( #459569=note: print w/replies, xml ) Need Help??


in reply to Ldap Group membership

Have a look at Net::LDAP. The code will look something like:

use strict; use Net::LDAP; my $ldap = Net::LDAP->new($ldaphost); my $result = $ldap->search( base=>$groupdn,filter=>'(objectclass=*)',a +ttrs=>['member']); if ($result->code) { print $result->error."\n"; exit 1; } my $entry = $result->entry; my @members = $entry->get('member');

Warning: Not tested.

Update: added an error check.

--------------------------------------------------------------

g0n, backpropagated monk

Replies are listed 'Best First'.
Re^2: Ldap Group membership
by Anonymous Monk on Nov 07, 2014 at 21:00 UTC
    Why would someone post something that is not tested? Does it helps anyone?
      it helped me!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://459569]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2022-12-03 21:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?