plugin password chpasswd driver needs to send a newline
|Reported by:||bk||Owned by:|
|Severity:||normal||Keywords:||plugin, password, chpasswd|
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.