6.0.0-beta1
7/26/25

[#4570] Streamlining of passwd expect driver
Summary Streamlining of passwd expect driver
Queue Passwd
Queue Version HEAD
Type Enhancement
State No Feedback
Priority 1. Low
Owners
Requester gavin (at) gwenandgavin (dot) ca
Created 10/28/2006 (6846 days ago)
Due
Updated 11/09/2008 (6103 days ago)
Assigned 10/29/2006 (6845 days ago)
Resolved 11/09/2008 (6103 days ago)
Milestone
Patch No

History
11/09/2008 03:32:14 AM Chuck Hagenbuch State ⇒ No Feedback
 
04/16/2008 06:04:15 PM Chuck Hagenbuch Comment #5
State ⇒ Stalled
Reply to this comment
Marking as stalled for now. We'll re-open if there's activity.
02/24/2008 09:56:43 PM gavin (at) gwenandgavin (dot) ca Comment #4 Reply to this comment
Ping?
Still here.  It has been so long since I created this patch, that 
looking into merging this will take as long as it took to write it in 
the first place.  I will keep this on my list of things to do, but it 
is pretty low on a long list.
02/24/2008 12:29:33 PM Jan Schneider Comment #3 Reply to this comment
Ping?
12/24/2007 10:06:41 PM Chuck Hagenbuch Comment #2
Taken from Eric Rostetter
State ⇒ Feedback
Taken from Jan Schneider
Taken from Horde DevelopersHorde Developers
Reply to this comment
Unfortunately this patch doesn't apply cleanly anymore. It looks like 
some of the improvements have been merged, and there's a separate 
kpasswd_expect script. Any chance you could update the remaining 
improvements against HEAD?



(I took a shot, but got lost where the new code has a case for sudo)
10/29/2006 11:32:47 AM Jan Schneider Assigned to Jan Schneider
 
10/29/2006 03:07:01 AM Chuck Hagenbuch State ⇒ Assigned
Assigned to Horde DevelopersHorde Developers
Assigned to Eric Rostetter
 
10/28/2006 04:42:36 AM gavin (at) gwenandgavin (dot) ca Comment #1
Priority ⇒ 1. Low
Type ⇒ Enhancement
Summary ⇒ Streamlining of passwd expect driver
Queue ⇒ Passwd
New Attachment: passwd_expect.patch Download
State ⇒ New
Reply to this comment
Reworked the expect and send logic using exp_continue.  See full 
description below.

Added procs that ensure consistent handling of sending and exiting.

Changed default fingerprint_string to work with any prompt that asks 
"Are you sure you want to continue connecting"

Changed default verify_string to accomodate "Retype New Password" and 
"Retype new password"

Removed old commented out code

Changed starting of remote session to be as generic as possible, 
including removing special case handling of telnet.

Added a common timeout handler so every expect command does not have 
to accomodate timeout

Added handling no output from program  that indicates success.

Ensured that success is returned even if timeout after passwd changed

Added handling of kpasswd through the -kpasswd command line option and 
minor additions to the verify_string



Old logic for expecting and sending was:

0> If telnet check for user name prompt and send

1> enter password at prompt or ssh accept fingerprint message

2> start password changing prompt or send old password if passwd 
already started

3> send old password if we just sent old password

4> send new password if being prompted

5> send new password again

6> check response



New logic using exp_continue and expect_after

1> log in (accept finger print string, supply username, and/or supply 
password)

2> start password changing program (if necessary) and send old 
password.  Wait for old password to be accepted.

3> send new password (no expect necessary)

4> send new password again and wait for password to be verified


Saved Queries