6.0.0-alpha12
6/12/25

[#5300] Script for passwd which uses sudo
Summary Script for passwd which uses sudo
Queue Passwd
Queue Version HEAD
Type Enhancement
State Resolved
Priority 1. Low
Owners jan (at) horde (dot) org
Requester voetelink (at) ecn (dot) nl
Created 04/24/2007 (6624 days ago)
Due
Updated 09/20/2007 (6475 days ago)
Assigned 05/22/2007 (6596 days ago)
Resolved 09/20/2007 (6475 days ago)
Milestone
Patch No

History
09/20/2007 08:31:44 PM Jan Schneider Comment #9
State ⇒ Resolved
Reply to this comment
Fixes and example configuration committed.
05/22/2007 05:32:37 PM Chuck Hagenbuch Assigned to Jan Schneider
State ⇒ Assigned
 
05/22/2007 02:30:12 PM voetelink (at) ecn (dot) nl Comment #8 Reply to this comment
Committed, thanks.

Can you please explain why this doesn't work with the expect driver,
and how made it work with the procopen driver?
If I use the expect driver, the webpage always states that the update 
was succesful, even if I entered a wrong password or a too short new 
password.



I used the following lines in backends.php to get the script running 
with sudo:

------

$backends['sudo_passwd'] = array(

     'name' => 'Webmail',

     'preferred' => '',

     'password policy' => array(),

     'driver' => 'procopen',

     'params' => array(

         'program' => '/usr/bin/expect ' . dirname(__FILE__) . 
'/../scripts/passwd_expect -sudo'

     )

);

=====


05/22/2007 02:27:08 PM voetelink (at) ecn (dot) nl Comment #7
New Attachment: passwd_expect[1] Download
Reply to this comment
Updates version, includes comments and fixed a small bug
05/10/2007 11:42:55 AM voetelink (at) ecn (dot) nl Comment #6 Reply to this comment
Could you please add the following comments to the script? I forgot 
that myself....



# alter sudoers (using visudo) so it contains the following information:

# -----

# # Needed for Horde's passwd module

# Runas_Alias     REGULARUSERS = ALL, !root

# apache ALL=(REGULARUSERS) NOPASSWD:/usr/bin/passwd

# -----




05/10/2007 10:45:09 AM Jan Schneider Comment #5 Reply to this comment
Committed, thanks.



Can you please explain why this doesn't work with the expect driver, 
and how made it work with the procopen driver?
05/10/2007 09:39:33 AM voetelink (at) ecn (dot) nl Comment #4
New Attachment: passwd_expect Download
Reply to this comment
Apologies, other projects demanded my attention...



I merged it into the passwd_expect.
05/10/2007 09:29:41 AM Jan Schneider Comment #3 Reply to this comment
Ping?
04/25/2007 01:46:10 PM Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
Can't you merge this with the existing passwd_expect script?
04/24/2007 02:15:49 PM voetelink (at) ecn (dot) nl Comment #1
Priority ⇒ 1. Low
State ⇒ New
New Attachment: sudo_passwd Download
Queue ⇒ Passwd
Summary ⇒ Script for passwd which uses sudo
Type ⇒ Enhancement
Reply to this comment
I didn't like the current possibilities and decided to copy one of the 
expect scripts and change it to use sudo.



I could not get it to work with the 'expect' driver, but with the 
'procopen' driver it works great!

Saved Queries