in reply to NT Authentication
I ran AuthenticateUser() in the debugger to see what it does, and found that it returns the empty string '' (false) if the user is not Authentic, and 1 (true) if they are. I would run your script with the -w flag to get warnings. This way you would know that @result was defined when you print it. My suggested test code for you:#!D:/Perl/bin/perl.exe use Win32::AuthenticateUser; @result = AuthenticateUser("domain", "smith", "abc123"); print @result;
#!D:/Perl/bin/perl.exe -w use strict; #always. use Win32::AuthenticateUser; # My version of Win32::AuthenticateUser did not export the function. my $result = Win32::AuthenticateUser::AuthenticateUser( "domain", "smith", "abc123"); print $result ? 'Authentic User' : 'Unknown User or Password';
|
|---|