[sork] Re: expect and passwd

j.huinink at wanadoo.nl j.huinink at wanadoo.nl
Thu Feb 20 09:24:20 PST 2003


Hello, 

> > Is this a know problem, or how do I start debugging? 
> 
> Probably just not finding your password prompt because it is different from 
> other systems?  Most likely...  Could be something else, but probably just 
> a prompt matching problem. 
> 
> You will need to edit passwd/scripts/passwd_expect to match your prompts. 
> The problem with expect scripts is that it looks for patterns in prmompts 
> and outputs, but those change between systems... 
  
I myself had no experience in running expect, but after some browsing through 
documentation and man pages I came up with the following patch that helped me 
debug the expect script. 

Expect creates a log file in your upload_tmp_dir (I think this is in your 
php.ini) called passwd.log. If you add the -d flag to the expect command it 
will show all the prompts that expect receives from yout system and the rules 
that it tries to match. This should tell you where and why it fails. 

Note that the passwd.log file will contain plaintext copies of the password so 
you should be very carefull not to test this with sensitive users and/or 
passwords and to remove the debug info in a production environment. 

I hope this helps. 

Eric, I assume that a lot of people who want to use the expect backend will 
have similar problems. How would you feel about including something along the 
lines of the above in the code where the log file is returned in the browser or 
something when you are in debuggin mode? 

Regards, 
Jeroen 




__________________________________________________________


http://www.wanadoo.nl/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: expect_debug.diff
Type: application/octet-stream
Size: 610 bytes
Desc: not available
Url : http://lists.horde.org/archives/sork/attachments/20030220/a0d9d131/expect_debug.obj


More information about the sork mailing list