If anyone has gotten this work successfully, if so please let me know what
OS version, SP level, any patches, Perl Version, and AdminMisc version you
have.  I would greatly appreciate is.  I have tried the 2 latest AdminMisc
modules with the two most recent version of perl...


Has anyone gotten LogonAsUser to work with Active State perl 5.6 build
620?  I am using 20000708 adminmisc.  I guess the better question is has it
ever worked with AS perl.  I also tried it with build 522 and it fails.
have given the domain user the specified rights on the local system that it
runs on, I also set the rights on the Domain too.  This is my code it can't
get any simpler than this.  It fails every time with error code 0, When I
format the error, I get "The operation
completed successfully"  ??!!.  Is there any functions that can get more
detailed information on the errors.

******
use Win32::adminmisc;
if (Win32::AdminMisc::LogonAsUser("DOMNAME",
                                  "AdminUser",
                                  "AdminPassword",
                                  LOGON32_BATCH))
  {
    print "Successfully impersonating " .
Win32::AdminMisc::GetLogonName() . "\n";
  }
else
 {
   print 'Error: Failed to logon, ', Win32::GetLastError() . "\n";
   %Win = Win32::AdminMisc::GetWinVersion();
      ($Platform) = ($Win{Platform} =~ /Win_?(.*)/);
  print "       We are using Windows $Platform\n";
  print "       Version $Win{Major}.$Win{Minor}\n";
  print "       Build $Win{Build}\n";
  print "       $Win{CSD}\n";
 }
********
Nt 4.0
SP 5
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web

Reply via email to