6.0.0-git
2019-04-24

[#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 2007-04-24 (4383 days ago)
Due
Updated 2007-09-20 (4234 days ago)
Assigned 2007-05-22 (4355 days ago)
Resolved 2007-09-20 (4234 days ago)
Milestone
Patch No

History
2007-09-20 20:31:44 Jan Schneider Comment #9
State ⇒ Resolved
Reply to this comment
Fixes and example configuration committed.
2007-05-22 17:32:37 Chuck Hagenbuch Assigned to Jan Schneider
State ⇒ Assigned
 
2007-05-22 14:30:12 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'

     )

);

=====


2007-05-22 14:27:08 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
2007-05-10 11:42:55 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

# -----




2007-05-10 10:45:09 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?
2007-05-10 09:39:33 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.
2007-05-10 09:29:41 Jan Schneider Comment #3 Reply to this comment
Ping?
2007-04-25 13:46:10 Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
Can't you merge this with the existing passwd_expect script?
2007-04-24 14:15:49 voetelink (at) ecn (dot) nl Comment #1
Type ⇒ Enhancement
State ⇒ New
Priority ⇒ 1. Low
Summary ⇒ Script for passwd which uses sudo
Queue ⇒ Passwd
New Attachment: sudo_passwd Download
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