Hello all, Im using samba 3.0.11 and openldap. I need a way to auto create my users home when they connect to their HOME share. How can i do that?! PS: i tried the preexec directive but it didnt work! :o| Thanks! +---------------------------------------- | Lu?s Miguel Ferreira da Silva | Network Administrator @ISPGaya | Instituto Superior Polit?cnico Gaya | Rua Ant?nio Rodrigues da Rocha, 291/341 | Sto. Ov?dio ? 4400-025 V. N. de Gaia | Tel: +351 223745730/3/5 | GSM: +351 912671471 +351 936371253 +---------------------------------------- ---------------------------------------------------------------- Este email foi enviado via o webmail do ISPGaya Instituto Superior Polit?cnico Gaya
This may or may not apply to your case as I'm not doing ldap authentication, however the "add user script" directive in smb.conf has served me very well for the past couple of years. Tom Schaefer On Tue, 5 Apr 2005 12:12:58 +0100 Lu?s Miguel Silva <lms@ispgaya.pt> wrote:> Hello all, > > Im using samba 3.0.11 and openldap. > I need a way to auto create my users home when they connect to their HOME share. > > How can i do that?! > > PS: i tried the preexec directive but it didnt work! :o| > > Thanks! > +---------------------------------------- > | Lu?s Miguel Ferreira da Silva > | Network Administrator @ISPGaya > | Instituto Superior Polit?cnico Gaya > | Rua Ant?nio Rodrigues da Rocha, 291/341 > | Sto. Ov?dio _ 4400-025 V. N. de Gaia > | Tel: +351 223745730/3/5 > | GSM: +351 912671471 +351 936371253 > +---------------------------------------- > > > ---------------------------------------------------------------- > Este email foi enviado via o webmail do ISPGaya > Instituto Superior Polit?cnico Gaya >
tir, 05.04.2005 kl. 13.12 skrev Lu?s Miguel Silva:> Im using samba 3.0.11 and openldap. > I need a way to auto create my users home when they connect to their HOME share. > > How can i do that?! > > PS: i tried the preexec directive but it didnt work! :o|Well, it works for me ;) I stole this from something a poster to this list wrote. Since I have 1150+ potential users it's very necessary All on one line, /etc/samba.conf, for [homes]: root preexec = /etc/samba/scripts/mk_sambadir "/m/samba3/home/%u" "%u" "%g" /etc/samba/scripts/mk_sambadir: #!/bin/bash if [ ! -d "$1" ] then mkdir "$1" fi chmod 770 "$1" -R chown "$2" "$1" -R chgrp "$3" "$1" -R I use something similar to create profile dirs - on the fly, but there are many other ways tof skin the same cat! --Tonni -- Nothing sucksseeds like a pigeon without a beak ... mail: tonye@billy.demon.nl http://www.billy.demon.nl They love us, don't they, They feed us, won't they ...