adding existing nt user to nt global group

Discussion in 'Perl Misc' started by Arun, Jan 28, 2004.

  1. Arun

    Arun Guest

    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";
    Arun, Jan 28, 2004
    #1
    1. Advertising

  2. Arun

    Matt Garrish Guest

    "Arun" <> wrote in message
    news:...
    > 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
    Matt Garrish, Jan 29, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. MS News \(MS LVP\)

    Re: Adding user to the debug group

    MS News \(MS LVP\), Aug 6, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    388
    MS News \(MS LVP\)
    Aug 6, 2003
  2. Amil
    Replies:
    0
    Views:
    373
  3. nrm
    Replies:
    3
    Views:
    528
  4. localhost

    Determine Global Group vs User in Local?

    localhost, Dec 10, 2003, in forum: ASP .Net Security
    Replies:
    9
    Views:
    170
  5. Replies:
    0
    Views:
    188
Loading...

Share This Page