* $f = &File_Passwd::factory('SMB'); * $f->setFile('./smbpasswd'); * $f->load(); * $f->addUser('sepp3', 'MyPw', array('userid' => 12)); * $f->changePasswd('sepp', 'MyPw'); * $f->delUser('karli'); * foreach($f->listUser() as $user => $data) { * echo $user . ':' . implode(':', $data) ."\n"; * } * $f->save(); *
* $f = &File_Passwd::factory('SMB'); * $f->setFile('./smbpasswd'); * $f->addUser('sepp1', 'MyPw', array('userid'=> 12)); * $f->addUser('sepp3', 'MyPw', array('userid' => 1000)); * $f->save(); *
* $f = &File_Passwd::factory('SMB'); * $f->setFile('./smbpasswd'); * $f->load(); * if (true === $f->verifyPasswd('sepp', 'MyPw')) { * echo "User valid"; * } else { * echo "User invalid or disabled"; * } *