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

AW: Automatically create home directory uppon Email login


-----Ursprüngliche Nachricht-----
Von: openldap-technical-bounces+claus.kick=siemens.com@OpenLDAP.org [mailto:openldap-technical-bounces+claus.kick=siemens.com@OpenLDAP.org] Im Auftrag von Almir Karic
Gesendet: Dienstag, 22. Juli 2008 13:09
An: Stelios A.
Cc: openldap-technical@openldap.org
Betreff: Re: Automatically create home directory uppon Email login

On Tue, Jul 22, 2008 at 12:27 PM, Stelios A. <stelios.a@gmail.com> wrote:
> I've migrate an old Sun Directory Server to OpenLDAP (version 2.4.9 on
> Ubuntu 8.04 server) and setup a master/slave with syncrepl for data
> replication betwwen 2 servers.
> 1st server hold the master ldap and second the slave along with the
> email server (Sendmail + Dovecot).
> Email server requires ofcourse a home directory with a mbox file etc.
> Is there a way to avoid creating each users home directory and setup
> then his/her permissions?
> There are 980 users in the base dc and trying to figure out a way to
> avoid creating all this directories along with chmod manually.

I would write a script which creates the home directory and files and sets the permissions once.

Then, how do you add new users? If its some CGI task or whatever, you could always run about the same script, only this time you do not iterate over all users but just call it for the freshly created one (using the creation task as triggering event, so to speak).

If you do not have any task which could trigger the script, set up a cronjob requesting all users and checking for the home dirs and creating the new ones so on.

Best regards,