previousFile_SMBPasswd::delUser() (Previous) (Next) File_SMBPasswd::verifyAccount()next

View this page in Last updated: Sun, 21 Jun 2009
English | Brazilian Portuguese | Chinese | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Turkish

File_SMBPasswd::verifyAccountEncrypted()

File_SMBPasswd::verifyAccountEncrypted() – あらかじめ暗号化されたパスワードで新規ユーザーを検証する

Synopsis

mixed File_SMBPasswd::verifyAccountEncrypted ( string $user , string $nthash , string $lmhash = '' )

Description

このメソッドは、ロードした smbpasswd ファイル中のエントリに対し 与えられたユーザー名とプレーンテキストなパスワードを検証します。 与えられるパスワードは有効な NT ハッシュもしくは LM ハッシュである必要があります。LM ハッシュはオプションです。

Parameter

  • string $user - 検証するユーザー名

  • string $nthash - NT ハッシュ

  • string $lmhash - LM ハッシュ

Return value

mixed - Returns TRUE on success, FALSE on failure.

Example

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";
}

?>
previousFile_SMBPasswd::delUser() (Previous) (Next) File_SMBPasswd::verifyAccount()next

Download Documentation Last updated: Sun, 21 Jun 2009
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.