Opened 3 years ago
Closed 2 years ago
#1487141 closed Bugs (fixed)
plugin password chpasswd driver needs to send a newline
| Reported by: | bk | Owned by: | |
|---|---|---|---|
| Priority: | 5 | Milestone: | 0.5-stable |
| Component: | Plugins | Version: | 0.4.2 |
| Severity: | normal | Keywords: | plugin, password, chpasswd |
| Cc: |
Description
When trying to use the password plugin with the chpasswd driver, I always got the message that the new password could not be saved.
The log stated that the command supplied could not be executed, despite the apache user being in sudoers and all that.
Exmining the code, I noticed that in
plugins/password/drivers/chpasswd.php, line 21
no newline "\n" is being sent to the executed chpasswd command. I believe this is necessary, for when I call the chpasswd binary from the CL and try to enter data without a newline but ending input with D, I get an error message. When I added a newline in the file referenced above, all worked fine.
I am running debian stable and the passwd package which contains chpasswd binary is at version 1:4.1.1-6+lenny1
I don't know if this behaviour of chpasswd is specific to the version shipped with debian, and I have no access to other servers to confirm it.
I attach a copy of my changed driver.
Attachments (1)
Change History (4)
Changed 3 years ago by bk
comment:1 Changed 3 years ago by bk
comment:2 Changed 3 years ago by alec
- Milestone changed from later to 0.5-beta
comment:3 Changed 2 years ago by alec
- Resolution set to fixed
- Status changed from new to closed
Fixed in r4291/svn.

Sorry for not reviewing the ticket properly, I didn't mean to go superscript but say CTRL+D with the caret in the fifth paragraph.