Passwd 5.0 and Expect
"Kinglok, Fong" <[email protected]> Mon, 24 Jun 2013 22:48:37 +0800
| Newsgroups | gmane.comp.horde.sork |
|---|---|
| Message-ID | <[email protected]> |
--Apple-Mail=_F90948DD-7743-4AB0-BDD6-58A573911C9C
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=us-ascii
Dear all,
I would like to report a problem regarding on using expect in passwd =
5.0.
My settings are as follows
Horde 5.1.1
IMP 6.1.2
Passwd 5.0.0
I have disabled all other backends but still the following one enabled.
/var/www/html/webmail/passwd/config/backends.local.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
$backends['expect'] =3D array(
'disabled' =3D> false,
'name' =3D> 'Expect Script',
'driver' =3D> 'expect',
'policy' =3D> array(
'minLength' =3D> 6,
'minNumeric' =3D> 1,
),
'params' =3D> array(
'program' =3D> '/usr/bin/expect',
'script' =3D> PASSWD_BASE . '/scripts/vpopmail_cdb_expect',
),
);
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
I have installed an expect script for vpopmail (running on cdb, not =
mysql) in /var/www/html/webmail/passwd/scripts/vpopmail_cdb_expect (see =
attachment)
After entering old and new password in passwd 5.0.0, it keeps saying =
"Failure in changing password for Expect script:".
I have tried setting the logging of horde (conf.php) to DEBUG, but still =
there is no relevant log and I've checked that all permission is right.
Can anyone help?
Kinglok, Fong
--Apple-Mail=_F90948DD-7743-4AB0-BDD6-58A573911C9C
Content-Disposition: attachment;
filename=vpopmail_expect
Content-Type: application/octet-stream;
name="vpopmail_expect"
Content-Transfer-Encoding: quoted-printable
#=20if=20using=20hook=20in=20login=20that=20strip=20domain=20name=20from=20=
the=20login=20ID,=20=0D#=20this=20script=20should=20be=20used=20to=20=
append=20the=20domain=20name=0D#=20$Horde:=20=
passwd/scripts/vpopmail_cdb_expect,v=201.6=202005/04/20=2005:51:17=20=
selsky=20Exp=20$=0D#=0D=0D#=20read=20input=20from=20stdin=0Dfconfigure=20=
stdin=20-blocking=201=0Dgets=20stdin=20user=0Dgets=20stdin=20=
password_old=0Dgets=20stdin=20password_new=0D=0Dlog_user=200=0Dset=20=
timeout=201=0Dset=20log_file=20"/tmp/log-horde"=0Dset=20domain=20=
"@domain.com"=0D=0D#=20read=20in=20other=20option=0Dfor=20{set=20i=200}=20=
{$i<$argc}=20{incr=20i}=20{=0D=20=20=20=20set=20arg=20[lindex=20$argv=20=
$i]=0D=20=20=20=20switch=20--=20$arg=20"-log"=20{=0D=20=20=20=20=20=20=20=
=20incr=20i=0D=20=20=20=20=20=20=20=20set=20log_file=20[lindex=20$argv=20=
$i]=0D=20=20=20=20=20=20=20=20continue=0D=20=20=20=20}=0D}=0D=0Dset=20=
err=20[open=20$log_file=20w=20]=0D=0Dset=20pid=20[spawn=20=
/home/vpopmail/bin/vchangepw]=0Dexpect=20{=0D=20=20-re=20"Please=20=
enter.*"=20{=20send=20$user$domain\r=20}=0D=20=20timeout=20=20=20=20=20=20=
=20{puts=20$err=20"Cannot=20start=20vchangepw=20program.\n"=0D=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20close=20$err=0D=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20exit=201}=0D}=0D=0Dexpect=20{=0D=20=20=
$user=20=20=20=20=20=20=20=20=20{=20puts=20$err=20""}=0D=20=20timeout=20=20=
=20=20=20=20=20{puts=20$err=20"Cannot=20continue=201=20vchangepw=20=
program.\n"=0D=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20close=20=
$err=0D=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20exit=201}=0D}=0D=
expect=20{=0D=20=20-re=20"Enter=20old=20password.*"=20{=20send=20=
$password_old\r=20}=0D=20=20timeout=20=20=20=20=20=20=20{puts=20$err=20=
"Cannot=20continue=202=20vchangepw=20program.\n"=0D=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20close=20$err=0D=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20exit=201}=0D}=0Dexpect=20{=0D=20=20-re=20"Please=20=
enter=20password.*"=20{=20send=20$password_new\r=20}=0D=20=20-re=20=
"Error:.*"=20=20=20=20=20=20=20=20=20=20=20{=0D=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20puts=20$err=20"Wrong=20password.\n"=0D=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20close=20$err=0D=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20exit=201}=0D=20=20timeout=20=20=20=20=20=20=
=20{puts=20$err=20"Cannot=20continue=203=20vchangepw=20program.\n"=0D=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20close=20err=0D=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20exit=201}=0D}=0D=0Dexpect=20{=0D=20=20=
-re=20"enter=20password=20again.*"=20=20=20=20=20{=20send=20=
$password_new\r=20}=0D=20=20timeout=20=20=20=20=20=20=20{puts=20$err=20=
"Cannot=20continue=204=20vchangepw=20program.\n"=0D=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20close=20$err=0D=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20exit=201}=0D}=0D=0Dexpect=20{=0D=20=20-re=20"Password=20=
successfully.*"=20=20=20=20{=20}=0D=20=20timeout=20=20=20=20=20=20=20=
{puts=20$err=20"Cannot=20continue=205=20vchangepw=20program.\n"=0D=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20close=20$err=0D=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20exit=201}=0D}=0Dputs=20$err=20"The=20=
password=20changed=20successfully."=0Dexpect=20{=0D=20=20=20eof=20=20{=20=
close=20$err=0D=20=20=20=20=20=20=20=20=20=20exit=200=20}=0D}=0D=0Dexit=20=
0=
--Apple-Mail=_F90948DD-7743-4AB0-BDD6-58A573911C9C
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--
sork mailing list
Frequently Asked Questions: http://wiki.horde.org/FAQ
To unsubscribe, mail: [email protected]
--Apple-Mail=_F90948DD-7743-4AB0-BDD6-58A573911C9C--