[sork] passwd support for courier
Chris Petersen
lists at forevermore.net
Mon Apr 19 22:28:31 PDT 2004
I'm working on a module for passwd that interacts directly with the
courier mta's authdaemon for changing passwords. I have the
courier-specific stuff figured out, but have a couple of questions about
passwd itself.
For one, it auto-fills in the username field with an incomplete
username. For my virtual users, the username is their FULL email
address, but passwd strips off everything after the @. This stripping
really should be a configurable option. I'd honestly like a way to set
this input box off completely, so the user is only prompted with boxes
for their old/new passwords - less to screw up.
I can find no way to tell passwd which "driver" to use. I finally put
my courier settings first in the list in config/backends.php and it
seems to work. however, it would be nice if there was some
documentation about this on backends.php itself.
lastly, the more technical stuff... I've set up my change_password
method to return true upon password change, and false upon fail (which I
assume is what PEAR::raiseError() returns, although I've also tried
returning false by itself). However, even when the method returns
false, passwd comes back with "Password changed!" instead of my error
message. Although I think I've tracked this down to PEAR::raiseError
not "working" with error messages it doesn't recognize - this is an
issue if it can't connect to the socket, since the error generated comes
from php's fsockopen() itself. Or perhaps PEAR::raiseError and gettext
don't work so well together with an unknown string being passed to _() -
I'm not familiar with gettext.
I also get a lot of weirdness with the password verification stuff..
for example, my test password of "4whatever" verifies just fine, but
"5whatever" comes back as being too simple. Thought I'd mention it,
though I expect that you're just using an external library to check this
stuff.
Anyway, if I can get a couple of these questions answered (specifically,
the one dealing with error messages), I will have a new driver to
contribute.
-Chris
More information about the sork
mailing list