adding existing nt user to nt global group

A

Arun

I can't understand why I cant add users to a group
using this script. If I change the Netadmin line to
read GroupIsMember instead of GroupAddUsers, I can
check if the user belongs to a group. the error
message I get form this script is "Overlapped I/O
operation is in progress".

use Win32::NetAdmin;
use strict;

my $cwid1 = "test";


my $group= "testgroup" ;

my $server = "testdc";

my $domain1="dc\\";

my $user="";

my $passwd="";

`net use \\\\$server /user:$domain1$user $passwd`;

if
(Win32::NetAdmin::GroupAddUsers($server,$group,$cwid1)){

print "\"$cwid1\" has been added to the group
$group!\n";

}
else {

print "\"$cwid1\" cannot be found!\n";
 
M

Matt Garrish

Arun said:
I can't understand why I cant add users to a group
using this script. If I change the Netadmin line to
read GroupIsMember instead of GroupAddUsers, I can
check if the user belongs to a group. the error
message I get form this script is "Overlapped I/O
operation is in progress".

Check if an error is being returned from the net use call you're making.
That would be my guess as to where things might be going wrong for you. The
overlapped i/o message means that some action is still in progress, and the
likely culprit would be the system call.

Matt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,262
Messages
2,571,056
Members
48,769
Latest member
Clifft

Latest Threads

Top