Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Ldap Group membership

by g0n (Priest)
on May 23, 2005 at 14:10 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-04-20 03:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found