logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: Fwd: modify group membership using perl-ldap: msg#00023

Subject: Re: Fwd: modify group membership using perl-ldap
Casey,  the thing to remember, despite what the Microsoft GUI tells you
is that you add objects as members to a group not add the groups
to the object/user.

I use something like the following to add a user to a group:

sub addGroupMember {
    my $groupDn = shift;
    my $dn = shift;
    $mesg = $ldap->modify(
        $groupDn,
        changes => [ add => [ member => $dn ] ]
    );
$mesg->code && print "failed to add group membership: ", $result->error;
}

You can extend this theme to remove from groups etc...

regards.

Si

Graham Barr wrote:
Begin forwarded message:
From: "Casey J. Hergett" <chergett@xxxxxxx>
Date: June 18, 2007 2:15:13 PM CDT
To: <gbarr@xxxxxxxxx>
Subject: modify group membership using perl-ldap
Message-Id: <D8202855238392469D7D178504FABDBA27B2E7@xxxxxxxxxxxxxxxxxxxxxxxxxxx>

Is there a way to manipulate an objects group membership in Active
Directory using perl?



Casey Hergett

OneTech Portal Administrator

Arkansas Tech University

chergett@xxxxxxx








Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>