Source for file SMBPasswd.php
Documentation is available at SMBPasswd.php
/* vim: set expandtab tabstop=4 shiftwidth=4: */
// +----------------------------------------------------------------------+
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2003 The PHP Group |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.02 of the PHP license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available at through the world-wide-web at |
// | http://www.php.net/license/2_02.txt. |
// | If you did not receive a copy of the PHP license and are unable to |
// | obtain it through the world-wide-web, please send a note to |
// | license@php.net so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// | Authors: Michael Bretterklieber <michael@bretterklieber.com> |
// +----------------------------------------------------------------------+
// $Id: SMBPasswd.php,v 1.2 2004/03/28 23:19:50 yavo Exp $
require_once "File/SMBPasswd.php";
require_once "Auth/Container.php";
* Storage driver for fetching login data from an SAMBA smbpasswd file.
* This storage container can handle SAMBA smbpasswd files.
* $a = new Auth("SMBPasswd", '/usr/local/private/smbpasswd');
* printf ("AUTH OK<br>\n");
* @author Michael Bretterklieber <michael@bretterklieber.com>
* @version $Revision: 1.2 $
* Constructor of the container class
* @param $filename string filename for a passwd type file
* @return object Returns an error object if something went wrong
$this->pwfile = new File_SMBPasswd ($filename,0 );
PEAR ::raiseError ("Error while reading file contents.", 41 , PEAR_ERROR_DIE );
* Get user information from pwfile
return $this->pwfile->verifyAccount ($username, $password);
return $this->pwfile->getAccounts ();
* Add a new user to the storage container
* @param array Additional information
function addUser($username, $password, $additional = '')
$res = $this->pwfile->addUser ($user, $additional['userid'], $pass);
* Remove user from the storage container
$res = $this->pwfile->delUser ($username);
* Change password for user in the storage container
* @param string The new password
$res = $this->pwfile->modUser ($username, '', $password);
Documentation generated on Mon, 11 Mar 2019 13:52:33 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|