Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > adding existing nt user to nt global group

Reply
Thread Tools

adding existing nt user to nt global group

 
 
Arun
Guest
Posts: n/a
 
      01-28-2004
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,$cw id1)){

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

}
else {

print "\"$cwid1\" cannot be found!\n";
 
Reply With Quote
 
 
 
 
Matt Garrish
Guest
Posts: n/a
 
      01-29-2004

"Arun" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FWSM/PIX and Dynamic PAT using global IP range vs. global interface vs. global IP Hoffa Cisco 1 10-25-2006 06:50 PM
FWSM/PIX and Dynamic PAT using global IP range vs. global interface vs. global IP Hoffa Cisco 0 10-25-2006 01:04 PM
Why no existing Java type to existing XML schema binding support? nrm Java 3 04-10-2006 04:52 PM
Tablet PC User Group introduction (and Windows Mobile User Group reminder) Mauricio Freitas NZ Computing 0 07-09-2005 09:19 PM
Project Architecture - Adding new user control to existing web application Amil ASP .Net 0 04-05-2004 05:28 PM



Advertisments