Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
LDAP, courier-imap and autocreation of homedirs
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Jesore
Apprentice
Apprentice


Joined: 17 Jul 2002
Posts: 232
Location: Nürnberg Germany

PostPosted: Fri Jun 10, 2005 7:30 am    Post subject: LDAP, courier-imap and autocreation of homedirs Reply with quote

Hi all,

I'm configuring a server, where every daemon ist configured to authenticate users by a LDAP. Everything works so far, except the automatic creation of the homedirs. Ftp, ssh works, if a user gets mail, the maildir is also automatically created. The problem lies within courier-imap. If the user logs in by that first, he gets an error, because there is no homedir and maildir. I configured the authdaemon to use pam and integrated pam_mkhomedir, but it still doesn't work.

Code:

/etc/pam.d/system-auth-ldap:
auth       required     /lib/security/pam_env.so
auth       sufficient   /lib/security/pam_ldap.so
auth       sufficient   /lib/security/pam_unix.so likeauth nullok use_first_pass
auth       required     /lib/security/pam_deny.so

account    sufficient   /lib/security/pam_ldap.so
account    required     /lib/security/pam_unix.so

password   required     /lib/security/pam_cracklib.so retry=3
password   sufficient   /lib/security/pam_ldap.so nullok md5 shadow use_authtok
password   sufficient   /lib/security/pam_unix.so nullok md5 shadow use_authtok use_first_pass
password   required     /lib/security/pam_deny.so

session    required     /lib/security/pam_limits.so
session    required     /lib/security/pam_mkhomedir.so skel=/etc/skel/ umask=0072
session    sufficient   /lib/security/pam_ldap.so
session    required     /lib/security/pam_unix.so

/etc/pam.d/imap
auth       required     pam_nologin.so
auth       required     pam_stack.so service=system-auth-ldap
account    required     pam_stack.so service=system-auth-ldap
session    required     pam_stack.so service=system-auth-ldap

/etc/courier/authlib/authdaemonrc
...
authmodulelist="authpam"
...


Am I missing something or won't that work that way at all?

Jesore
Back to top
View user's profile Send private message
j.crottaz
n00b
n00b


Joined: 12 Jul 2006
Posts: 16

PostPosted: Wed Jul 12, 2006 5:32 pm    Post subject: Reply with quote

Read in courier-imap doc, compiling qith authdaemon will disable the possibility to use pam_mkhomedir. Actually I'm in search of how to compile courier via ebuild but not the authdaemon portion.
Back to top
View user's profile Send private message
kashani
Advocate
Advocate


Joined: 02 Sep 2002
Posts: 2032
Location: San Francisco

PostPosted: Wed Jul 12, 2006 6:21 pm    Post subject: Reply with quote

This is why almost all how-to's and evry web intereface worth its salt sends the user a welcome message upon creation. Solves the problem of maildir creation and includes the link to webmail and the rest of the nonsense.

kashani
_________________
Will personally fix your server in exchange for motorcycle related shop tools in good shape.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum