[horde] Passwd 5.0.0RC1: Composite driver and Expect params
Oscar del Rio
delrio at mie.utoronto.ca
Wed May 29 17:32:29 UTC 2013
I just installed Passwd H5 (5.0.0RC1).
The Expect driver works well by itself, with the following backend.local.php
$backends['expect']['disabled'] = false;
$backends['expect']['params']['script'] = PASSWD_BASE .
'/scripts/passwd-expect';
$backends['expect']['params']['params'] = '-host servername';
The successful command called by Driver/Expect.php is
LANG=C LC_ALL=C /usr/bin/expect -f
'/horde/passwd/lib/../scripts/passwd-expect' -- -host servername -log
'/var/tmp/passwdZ4aqha'
I am now trying to use Expect with the Composite driver:
$backends['combo'] = array(
'disabled' => false,
'name' => 'Passwords',
'driver' => 'Composite',
'policy' => array(
'minLength' => 6,
'minNumeric' => 1,
),
'params' => array('drivers' => array(
'expect' => array(
'name' => 'Unix Server',
'driver' => 'Expect',
'required' => true,
'params' => array(
'program' => '/usr/bin/expect',
'script' => PASSWD_BASE . '/scripts/passwd-expect',
'params' => '-host servername',
),
),
'samba' => array(
'name' => 'Samba Server',
'driver' => 'Smbpasswd',
'params' => array(
'program' => '/usr/bin/smbpasswd',
'host' => 'sambaserver',
),
),
)),
);
But Expect is failing. Debugging the code in Driver/Expect.php, the
command that it is trying to execute is
LANG=C LC_ALL=C /usr/bin/expect -f
'/horde/passwd/lib/../scripts/passwd-expect' -- Array -log
'/var/tmp/passwdiBa4pa'
Note "Array" in the command instead of the script params "-host
servername" ($this->_params['params'] in the Expect.php code)
Am I doing something wrong in the composite backend definition or is
this a bug?
Thanks!
More information about the horde
mailing list