[Samba] Restricting access to [homes]

Jorell JorellF at fastmail.net
Wed May 23 01:11:26 MDT 2012

here is what I use in my conf
path = /home/%D/%U
root preexec = /root/pdc/smbmkhomedir.sh %D %U

< smbmkhomedir.sh >
if [ ! -e /home/$1/$2 ]; then
     mkdir -p /home/$1/$2
     chown $2:"Domain Users" /home/$1/$2
     chmod 4711 /home/$1/$2
     setfacl --set=d:u::rwx,d:g::--x,d:o::---,d:u:$2:rwx,d:g:'domain 
users':--x /home/$1/$2
exit 0

instead of using 'valid users' maybe try setting "path = /home/%S"

More information about the samba mailing list