Рекурсивный акроним словосочетания «PHP: Hypertext Preprocessor»
Добро пожаловать на форум PHP программистов!
За последние 24 часа нас посетили 17915 программистов и 1644 робота. Сейчас ищут 1885 программистов ...
File_SMBPasswd::verifyAccountEncrypted()
Вернуться к: File_SMBPasswd
File_SMBPasswd::verifyAccountEncrypted()
File_SMBPasswd::verifyAccountEncrypted() – Verifies the given account with the given encrypted passwords.
Synopsis
mixed File_SMBPasswd::verifyAccountEncrypted ( string $user , string $nthash , string $lmhash = '' )
This method verifies the given username and passwords against the entry in the loaded smbpasswd file. The given passwords must already be a valid NT-Hash or LM-Hash, whereas the LM-Hash is optional.
Parameter
-
string $user - username to be verified
-
string $nthash - the NT-Hash
-
string $lmhash - the LM-Hash
Return value
mixed - Returns TRUE on success, FALSE on failure.
Example
Using File_SMBPasswd::verifyAccount()
<?php
require_once 'File/SMBPasswd.php';
$fh = new File_SMBPasswd('/usr/local/private/smbpasswd');
$fh->load();
if ($fh->verifyAccountEncrypted('mbretter', '75BA30198E6D1975AAD3B435B51404EE')) {
echo "Account is valid";
} else {
echo "Account is in-valid";
}
?>
Вернуться к: File_SMBPasswd