in reply to What modules are recommended for logging into a win2k server as a specific user?
Win32::AuthenticateUser is for impersonating someone else when you are already running on a machine. Your description makes me think you are instead trying to remotely authenticate to a server, which can be done like so:
which shows some room for improvement of the Win32::NetResource module. (: - tye (but my friends call me "Tye")use Win32::NetResource qw( AddConnection CancelConnection ); # ... my $mach= "www.microsoft.com"; my $username= "microsoft\\administrator"; my $password= "b1gd0g"; my $netResource= "\\\\$mach\\IPC\$"; if( ! AddConnection( { Scope=>0, Type=>0, DisplayType=>0, Usage=>0, LocalName=>"", RemoteName=>$netResource, Comment=>"", Provider=>"" }, $password, $username, 0 ) ) { warn "\nCan't connect to $mach: $^E\n"; return; }
|
|---|