[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: LDAP Home dir extraction/creation



Em Wed, Apr 24, 2002 at 03:50:07PM -0400, Denny Snyder escreveu:
> I am looking to migrate from flatfile auth to LDAP auth.  I now have a
> working OpenLDAP auth model on a test server with 23K entries with a clean
> /etc/passwd file.  Now I have a 2nd server also using auth against this test
> LDAP server that I need to have the home directories created on for all the
> users in LDAP and any future users created in LDAP.  I've looked for and
> found many migration tools that convert from LDAP to flatfile and vice versa
> but nothing that can pull existing LDAP Home dir information and create those
> home directories so that I can use Apache's user_dir directive.  I know there
> is an Apache mod_ldap_userdir but if there is no home directory - how will it
> work?  This 2nd server will also be running SquirrelMail to connect to the
> Main Server via LDAP and IMAP but this also requires a home dir to store
> settings, trash, etc....

Use pam_mkhomedir (on linux it's at /lib/security/pam_mkhomedir.so). Stick
something like this to your /etc/pam.d/login file, for instance: (...) session
required /lib/security/pam_mkhomedir.so

Then, if the homedir doesn't exist, pam_mkhomedir will create it.  (I think it
could be "optional" instead of "required", though).

BTW, the above is for linux.