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" <[EMAIL PROTECTED]>
Date: June 18, 2007 2:15:13 PM CDT
To: <[EMAIL PROTECTED]>
Subject: modify group membership using perl-ldap
Message-Id: <[EMAIL PROTECTED]>

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



Casey Hergett

OneTech Portal Administrator

Arkansas Tech University

[EMAIL PROTECTED]




Reply via email to