[Dovecot] Dovecot doesn't call pam_open_session,
thus dodging pam_mkhomedir
Nicolas Lopez
nlopez at espri.arizona.edu
Fri Jan 28 01:08:28 EET 2005
I hit a small snag using Dovecot-imapd smoothly in my environment
with maildir and most of my accounts in LDAP. Since the accounts are
created through a web interface on another server home directories on
the mail server don't get created automatically. There's the handy pam
module pam_mkhomedir.so to automagically create home directories, but
unfortunatly Dovecot wasn't calling pam_open_session to run the session
setup pam modules. I made a small patch to passdb-pam.c to call
pam_open_session between pam_acct_mgmt and pam_get_item and now I my
home dirs are automagically created and everyone is happy.
So, I figured I'd share the little patch in case someone else finds it
useful. My patch doesn't properly close the session which will probably
iritate more advanced session modules that actually have something to
clean up, oh well.
Aside from manually having to create home directories Dovecot-imapd
has been working really well for us for a number of months, I just
finally got around to dealing with the home dir creation issue.
- Nick Lopez
nlopez at espri.arizona.edu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: passdb-pam.c.diff
Type: text/x-patch
Size: 505 bytes
Desc: not available
Url : http://dovecot.org/pipermail/dovecot/attachments/20050127/ac7796ea/passdb-pam.c.bin
More information about the dovecot
mailing list