Hello,
Anyone have an experience to use Win32::AdminMisc::LogonAsUser
to logon to a new donaim?
I have an experience on different user in the same local,
but not to new dmain. This is my first script.
I can logon by hand of cause.
The below script says (in Japanese):
--
Win32 Logon Error: Client has no privilege.
LogonAsUser end, new user = Administrator
--
I'm running as Administrator.
Perl 5.8.7
Windows2000pro
Any idea?
#!/usr/bin/perl
use Win32;
use Win32::AdminMisc;
my $rc = Win32::AdminMisc::LogonAsUser('new_domain', 'my_id', 'my_pass');
if (! $rc) {
print "Win32 Logon Error: ",
Win32::FormatMessage(Win32::AdminMisc::GetError()), "\n";
}
my $new = Win32::AdminMisc::GetLogonName();
print "LogonAsUser end, new user = $new\n";
__END__
Regards,
Hirosi Taguti
[EMAIL PROTECTED]
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs