Toddy,
Remove Anonymous permissions on the file. This will force
authentication and make sure to use your account or an account
with user create powers. Since you are the admin, the script
will start working.
Michael Jones / Cincinnati / Ohio / US
--- Toddy Prawiraharjo <[EMAIL PROTECTED]> wrote:
> I tried this piece of code in command prompt, and
> things going well, but then I tried to run it from
> internet (browser), it gives me error message number
> 5.
> What's that errmsg means?? Then I suspect that's
> because I use Internet User to run that script via
> browser (IISv.4) which logically cannot create user in
> NT's SAM db. I tried logonasuser of AdminMisc, without
> luck. Any suggestion??
>
> use Win32::Lanman;
> if(!Win32::Lanman::NetUserAdd("\\pegasus", {'name'
> => 'testuser111','password' => 'testpassword',})){
> print "Sorry, something went wrong; error: ";
> # get the error code
> print Win32::Lanman::GetLastError();
> exit 1;
> } else {
> print "looks good!! ";
> }
>
> cheers,
> TP
>
> __________________________________________________
> Do You Yahoo!?
> Get email alerts & NEW webcam video instant messaging with
> Yahoo! Messenger. http://im.yahoo.com
> _______________________________________________
> Perl-Win32-Admin mailing list
> [EMAIL PROTECTED]
>
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin
__________________________________________________
Do You Yahoo!?
Listen to your Yahoo! Mail messages from any phone.
http://phone.yahoo.com
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin