Authen::Smb - Perl extension to authenticate against an SMB server
use Authen::Smb;
my $authResult = Authen::Smb::authen('myUser',
'myPassword',
'myPDC',
'myBDC',
'myNTDomain');
if ( $authResult == Authen::Smb::NO_ERROR ) {
print "User successfully authenticated.\n";
} else {
print "User not authenticated with error level $authResult\n";
}
An authentication request will return one of four values:
NTV_NO_ERROR (0) NTV_SERVER_ERROR (1) NTV_PROTOCOL_ERROR (2) NTV_LOGON_ERROR (3)
NTV_NO_ERROR is the only return value possible for a successful authentication. All other return values indicate failure, of one sort or another.
NTV_LOGON_ERROR NTV_NO_ERROR NTV_PROTOCOL_ERROR NTV_SERVER_ERROR
|
Закладки на сайте Проследить за страницей |
Created 1996-2025 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |