[sork] Re: expect and passwd

lody at great2cu.net lody at great2cu.net
Thu Feb 20 22:18:57 PST 2003


The expect script runs now without problems!

The tip with -d at first did not help, there was no output in the logfile, 
except when a wrong parameter or command was given.

Then I inserted a new topline in passwd_expect:

#!/usr/bin/expect -d

And then called the script:

./passwd_expect <login_name> <old_passwd> <new_passwd>

With the output sent to the terminal I could debug the required strings to 
match against.

So success at last

You were all a big help.

Next step will be the synchronisation with samba password, but I think that is 
beyond the scope of this mailing list

Lody.



Quoting Eric Rostetter <eric.rostetter at physics.utexas.edu>:

> Quoting j.huinink at wanadoo.nl:
> 
> > 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.
> 
> Sounds good, though I've not yet looked at it.
>  
> > 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.
> 
> Sounds great.
> 
> > 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.
> 
> For this reason, I would not want to make this web-available or otherwise
> accessible form outside the local system, to answer your question below.
> 
> > 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?
> 
> No, too dangerous, as you note above.  But I'm not against it generating
> the debug file on the local host machine.
> 
> Thanks for the code!
> 
> > Regards,
> > Jeroen
> 
> -- 
> Eric Rostetter
> The Department of Physics
> The University of Texas at Austin
> 
> Why get even? Get odd!
> -- 
> Sork mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: sork-unsubscribe at lists.horde.org
> 




-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/


More information about the sork mailing list