I ran into the same issue after many hours wasted.  I don't believe you are
doing anything wrong.  Also, I cannot get su.exe in the Win2k resource kit
to work either.  I have a feeling these bugs are do to some MS patches.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
Sheldon Fuchs
Sent: Tuesday, November 28, 2000 11:11 AM
To: [EMAIL PROTECTED]
Subject: AdminMisc::LogonAsUser


I am having some problems attempting to use Win32::AdminMisc::LogonAsUser,
basically it doesn't work ;-)

I have tried this using both my own domain account, as well as the local
admin for the machine, and still get the error printed, I am using 2k, not
sure if this will make the difference or not. Please, any help would be
appreciated. Here's the code:

if ( ! Win32::AdminMisc::LogonAsUser($Domain, $User, $Password)){
        print "Could not logon\n";
}
else {print "Logon was good\n";}

Of course, it's always "Could not logon". I'm not even certain how to
troubleshoot this (how do I get the last error from windows?) printing the
value of $! just gives "no such file or directory". I'm sure I'm missing
something.

Thanks.
Sheldon
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin

_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin

Reply via email to