[#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 Schneider <jan (at) horde (dot) org>
Requester voetelink (at) ecn (dot) nl
Created 04/24/2007 (383 days ago)
Due
Updated 09/20/2007 (234 days ago)
Assigned 05/22/2007 (355 days ago)
Resolved 09/20/2007 (234 days ago)
Attachments passwd_expect Download
passwd_expect[1] Download
sudo_passwd Download
Milestone
Patch

History
09/20/2007 Jan Schneider Comment #9
State ⇒ Resolved
Reply to this comment
Fixes and example configuration committed.
05/22/2007 Chuck Hagenbuch State ⇒ Assigned
Assigned to Jan Schneider
 
05/22/2007 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 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 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 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 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 Jan Schneider Comment #3 Reply to this comment
Ping?
04/25/2007 Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
Can't you merge this with the existing passwd_expect script?
04/24/2007 voetelink (at) ecn (dot) nl Comment #1
State ⇒ New
New Attachment: sudo_passwd Download
Priority ⇒ 1. Low
Queue ⇒ Passwd
Type ⇒ Enhancement
Summary ⇒ Script for passwd which uses sudo
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!