Hi Everyone,

I have been having a little bit of trouble writing a script which simply changes the passwords of all the Users on my system.

At first when i called GroupGetMembers() i received the error 'GroupGetMembers() failed Overlapped I/O Operation'
However when i replaced this with the 'LocalGroupGetMembers()' call this error was removed.

Moving on i entered the 'UserGetAttributes()' call, however the script now produces the "failed Overlapped I/O" error for the 'UserGetAttributes()' call.

As there is no 'LocalUserGetAttributes()' subroutine i am very unsure what to do next.

I am running ActivePerl and the script has administrator priviledges.
If i have left out any information please just ask.

Any help would be much appreciated

Here is the code which produces the error.
use Win32::NetAdmin qw/LocalGroupGetMembers UserGetAttributes UserSetAttributes/; my @users; LocalGroupGetMembers("",'Users', \@users) or die "GroupGetMembers() failed: $^E\n"; for(@users) { my ($server, $userName, $password, $passwordAge, $privilege, $homeDir, $comment, $flags, $scriptPath) = (); UserGetAttributes("",$_,$password,$passwordAge,$privil +ege, $homeDir, $comment, $flags, $scriptPat +h ) or die "UserGetAttributes() failed +$^E"; print "$username :: $password\n"; }
Thanks a lot.

Neil Archibald
- /dev/IT -

In reply to Win32::NetAdmin by devslashneil

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.