A PAM module to update CRAM-MD5 passwords used by the dovecot IMAP daemon, for cram-md5 login.
Steinar Bang d64884f374 Update README with updated status (now also has been run on jessie) and build/runtime requirements. | 7 years ago | |
---|---|---|
.gitignore | 11 years ago | |
LICENSE | 11 years ago | |
Makefile | 11 years ago | |
README.org | 7 years ago | |
pam_dovecotmd5pwd.c | 10 years ago |
This PAM module hooks into password changes, and updates the cram-md5 file, used by the dovecot IMAP deamon, for cram-md5 authentication, when PAM is used to change a user's password.
This PAM module has only been tested out in debian:
PAM unable to dlopen(pam_dovecotmd5pwd.so): /lib/security/pam_dovecotmd5pwd.so: wrong ELF class: ELFCLASS32Requirements
This module should work on all GNU/linux systems with dovecot and the libpam development files (PAM itself is AFAIK part of all GNU/linux distributions).
To install the requirements on a debian system, type the following in a root command line shell:
apt-get install dovecot-imapd libpam0g-dev
Installation
To build the module, type:
makeTo install the module, as root, either do:
make installor, after building, simply do:
cp pam_dovecotmd5pwd.so /lib/security/The final part is to add the new module to the =/etc/pam.d/common-password= file. Add the following line in a suitable place:
password required pam_dovecotmd5pwd.soI'm not entirely sure of where in the file to put it, but the comments in
/etc/pam.d/common-password
say:# As of pam 1.0.1-6, this file is managed by pam-auth-update by default. # To take advantage of this, it is recommended that you configure any # local modules either before or after the default block, and use # pam-auth-update to manage selection of other modules. See # pam-auth-update(8) for details.
From that comment, what I've done is put the config for the new module, after the line
# end of pam-auth-update configI.e. like so:
... # end of pam-auth-update config
# Update cram-md5 passwords for dovecot password required pam_dovecotmd5pwd.so
TODO list
This PAM module software is released under the GPLv2:
Copyright (C) 2013 Steinar Bang
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
The full text of the license can be found in the file LICENSE
.