Overview

Packages

  • None
  • Passwd

Classes

  • Passwd
  • Passwd_Driver
  • Passwd_Driver_Adsi
  • Passwd_Driver_Composite
  • Passwd_Driver_Expect
  • Passwd_Driver_Expectpecl
  • Passwd_Driver_Horde
  • Passwd_Driver_Http
  • Passwd_Driver_Kolab
  • Passwd_Driver_Ldap
  • Passwd_Driver_Pine
  • Passwd_Driver_Poppassd
  • Passwd_Driver_Procopen
  • Passwd_Driver_Pspasswd
  • Passwd_Driver_Servuftp
  • Passwd_Driver_Smbldap
  • Passwd_Driver_Smbpasswd
  • Passwd_Driver_Soap
  • Passwd_Driver_Sql
  • Passwd_Driver_Vmailmgr
  • Passwd_Driver_Vpopmail
  • Passwd_Exception
  • Passwd_Factory_Driver
  • Overview
  • Package
  • Class
  • Tree

Class Passwd_Driver_Pspasswd

The PSPasswd class changes a user's password on any Windows Machine (NT+) using the pspasswd free utility available at Sysinternals website: http://www.sysinternals.com/ntw2k/freeware/pspasswd.shtml

IMPORTANT!

This driver should be used only as a last resort when there's no possibility of using the ADSI or LDAP drivers, which are far more secure and fast. This driver needs administrative credentials exposed on the backends.php file, which is required by the pspasswd.exe tool. It's an alternative driver that should be avoided, but could also be the only option for a few scenarios. (eg: When you don't have ADSI or LDAP support)

Sample backend configuration:

$backends['pspasswd'] = array(
  'name' => 'Sample pspasswd backend',
  'preferred' => 'localhost',
  'policy' => array(
      'minLength' => 8,
      'maxLength' => 14
  ),
  'driver' => 'pspasswd',
  'params' => array(
     'server' => 'YOUR_SERVER_NAME',
     'bin' => 'DRIVE:\\DIR\\pspasswd.exe', // Notice: "\\"
     'admusr' => 'Administrator',
     'admpwd' => 'Password',
      'domain' => 'YOUR_DOMAIN_NAME'
  )
);

Backend parameters:

server  = Machine where you want to change the password (Required)
bin     = Full pathname of the pspasswd.exe program (Required)
admusr  = User with administrative privileges (Required)
admpwd  = Password of the administrative user (Required)
domain  = Windows domain name (Optional)

For example: Passing a NT4 PDC server name to the server parameter means you can change the user's password on that NT4 Domain.

Special thanks to Mark Russinovich (mark@sysinternals.com) for the tool and helping me solve some questions about it.

Copyright 2004-2012 Horde LLC (http://www.horde.org/)

See the enclosed file COPYING for license information (GPL). If you did not receive this file, see http://www.horde.org/licenses/gpl.php.

Passwd_Driver
Extended by Passwd_Driver_Pspasswd
Package: Passwd
Author: Luiz R Malheiros (malheiros@gmail.com)
Located at Driver/Pspasswd.php
Methods summary
public
# __construct( array $params = array() )

Constructor.

Constructor.

Parameters

$params
A hash containing connection parameters.

Throws

Passwd_Exception

Overrides

Passwd_Driver::__construct()
public
# changePassword( string $user_name, string $old_password, string $new_password )

Changes the user's password.

Changes the user's password.

Parameters

$user_name
The user for which to change the password.
$old_password
The old (current) user password.
$new_password
The new user password to set.

Throws

Passwd_Exception
API documentation generated by ApiGen