Prepend $server with \\\\

my $server = "\\\\testdc"; 

That should work (or use the domain name instead).

Steven                    
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Arun Budhwani
Sent: Monday, January 26, 2004 2:40 PM
To: [EMAIL PROTECTED]
Subject: Add domain user to global group


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";


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/
_______________________________________________
Perl-Win32-Admin mailing list [EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to