mixed File_SMBPasswd::modAccountEncrypted (
string $user
, int $userid
, string $nthash = ''
, string $lmhash = ''
, string $comment = ''
, string $flags = ''
)
前もって暗号化されたパスワードを使って既存のアカウントを修正します。
string $user
- 追加するユーザー名
int $userid
- ユーザーのユーザーID
string $nthash
- 新規 NT ハッシュ
string $lmhash
- 新規 LM ハッシュ
string $comment
- コメント
string $flags
- フラグ
mixed
- Returns TRUE on success,
PEAR_Error on failure.
This function can not be called statically.
追加するユーザーはすでにシステムパスワードファイルに存在していなければ ならないことに注意してください。
File_SMBPasswd::modAccountEncrypted() の使用例
<?php
require_once 'File/SMBPasswd.php';
// ユーザー mbretter を修正する
$fh = new File_SMBPasswd('/usr/local/private/smbpasswd');
$fh->load();
$status = $fh->modAccountEncrypted(
'mbretter',
1005,
'75BA30198E6D1975AAD3B435B51404EE',
'FC156AF7EDCD6C0EDDE3337D427F4EAC',
Michaela Bretterklieber');
if (PEAR::isError($status)) {
// エラーを処理する
} else {
$fh->save();
}
?>