Hello all,
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've already setup pam to auto create home directory uppon user login but problem is that only 5 users will have access via ssh.
Any ideas?
Thanks a lot
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.
IMHO a proper solution is to use virtual users, this way you won't have to have system users for mail to be delivered.
that being said i don't know how would one create home dirs on the login. you can use a workaround tho, create a script which creates the home dirs of users (and you can run it from cron to make sure home dirs for new mails get created as well).
Hi Almir,
Thanks for the reply. I found limited docs about virtual users and I'm confused how to achieve what you suggested. Would you please be more specific or post a usufull tutorial/manual?
Thanks
2008/7/22 Almir Karic redduck666@gmail.com:
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.
IMHO a proper solution is to use virtual users, this way you won't have to have system users for mail to be delivered.
that being said i don't know how would one create home dirs on the login. you can use a workaround tho, create a script which creates the home dirs of users (and you can run it from cron to make sure home dirs for new mails get created as well).
-- For far too long, power has been concentrated in the hands of "root" and his "wheel" oligarchy. We have instituted a dictatorship of the users. All system administration functions will be handled by the People's Committee for Democratically Organizing the System (PC-DOS).
On Tue, Jul 22, 2008 at 1:25 PM, Stelios A. stelios.a@gmail.com wrote:
Hi Almir,
Thanks for the reply. I found limited docs about virtual users and I'm confused how to achieve what you suggested. Would you please be more specific or post a usufull tutorial/manual?
i am not familiar with sendmail, so if you want to remain there i can't help you. i am using postfix with virtual_transport = dovecot and than in dovecot.conf i have:
userdb static { args = uid=5000 gid=5000 home=/home/postfix/%n@%d allow_all_users=yes }
you can costumize it so you don't have to move your mbox files, or you can move your mbox files and costumize it to reflect that (it should be noted that i use maildir).
IMHO a very good resource for mail related stuff is the isp style etch tutorial at workaround.org
-----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,
Claus
openldap-technical@openldap.org