File_Passwd_Smb::staticAuth

File_Passwd_Smb::staticAuth() – Fast authentication

Synopsis

require_once 'File/Passwd/Smb.php';

mixed File_Passwd_Smb::staticAuth ( string $file , string $user , string $pass , string $mode )

Description

Static user authentication.

Parameter

string $file

path to passwd file

string $user

user to authenticate

string $pass

plaintext password

string $mode

encryption mode ('nt'|'lm') NTHASH or LMHASH

Return value

Returns TRUE if authenticated, FALSE if not or PEAR_Error on failure.

Possible PEAR_Error values
Error Code Summary
FILE_PASSWD_E_NOT_EXISTS passwd file doesn't exist
FILE_PASSWD_E_FILE_NOT_OPENED passwd file couldn't be opened in read mode
FILE_PASSWD_E_FILE_NOT_LOCKED passwd file couldn't be locked shared
FILE_PASSWD_E_FILE_NOT_UNLOCKED passwd file couldn't be unlocked (only if auth fails)
FILE_PASSWD_E_FILE_NOT_CLOSED passwd file couldn't be closed /only if auth fails)
FILE_PASSWD_E_INVALID_ENC_MODE supplied encryption mode was invalid

Note

This function should be called statically.

File_Passwd_Smb (Previous) Constructor (Next)
Last updated: Wed, 23 Jul 2014 — 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.