This works for me using Lanman 1.0.9.1 and 1.0.9.2.  What code are you
using? What errors are you getting? More info would help.

if(!Win32::Lanman::NetGroupSetUsers($PDC, $GrpAllowed, \@members1))
{
        $^E = my $Error = Win32::Lanman::GetLastError();
        &LogText("$AppPath\\$LogFile", "Error setting $GrpAllowed membership
on $PDC. Error: $Error $^E");
        if ($Error == 2234)
        {
                my $text = "One or more user accounts have $GrpAllowed set
as their \'Primary Group\'." .
                                        " The account must be located and
the Primary Group reset to \'Domain Users\'";
                &LogText("$AppPath\\$LogFile", $text);
        }
}
else
{
        &LogText("$AppPath\\$LogFile", "$PDC \'$GrpAllowed\' updated
successfully with " . scalar (@members1) . " members");
}

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 20, 2002 4:00 PM
To: [EMAIL PROTECTED]
Subject: Adding Users to Groups


I've been fighting this all day.  I need to migrate about 30 local
groups and about 500 domain users from an NT 4.0 box to a Win2000 box.
I've been able to create the groups using Win32::Lanman, but haven't
been able to add users to those groups with either Win32::Lanman or
Win32::NetAdmin.  I'm logged on as administrator with Perl 5.6 Build 631
on the box.  Any suggestions???
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to