File_SMBPasswd::verifyAccountEncrypted() – Verifies the given account with the given encrypted passwords.


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.


  • 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.


Using File_SMBPasswd::verifyAccount()

require_once 'File/SMBPasswd.php';

$fh = new File_SMBPasswd('/usr/local/private/smbpasswd');
if (
$fh->verifyAccountEncrypted('mbretter''75BA30198E6D1975AAD3B435B51404EE')) {
"Account is valid";
} else {
"Account is in-valid";

File_SMBPasswd::delUser() (Previous) File_SMBPasswd::verifyAccount() (Next)
Last updated: Tue, 02 Jun 2009 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report or add a note.
View this page in:

User Notes:

There are no user contributed notes for this page.