On 5/10/2012 11:19 PM, Muhammad Yousuf Khan wrote:> i am u sing AD integrated Samba with winbind,I need to share a samba
> home folder for every single user in my Active directory. since i dont
> wanna create every user's directory i want samba to manage it. however
> i dont wanna place the home folders on default path as the boot drive
> (/dev/sda) is very small to store the data, beside that, i do have
> storage /nas/users which is a mount point of my raid array. so
> specifically every user's home folder should be created on /nas/users
> and this is my home share details in samba.
>
> [homes]
> comment = Home Directories
> browseable = yes
> writeable = yes
> create mask = 0700
> directory mask = 0700
> valid users = %S
>
> after sharing i can see two folders on the samba share
> 1. admin (which is my valid user and i was expecting this)
> 2. home ( this is some thing making me confuse, it shouldn't suppose
> to be there )
>
> however, when i click on both folders it gives me an error
>
> "you might not have permission to use this network resource ......
> Blah blah blah"[global]
>
> workgroup = xxxx
> realm = xxxx.COM
> netbios name = nasbox
> server string = %h server
> security = ADS
> obey pam restrictions = Yes
> pam password change = Yes
> passwd program = /usr/bin/passwd %u
> passwd chat = *Enter\snew\s*\spassword:* %n\n
> *Retype\snew\s*\spassword:* %n\n *password\supd$
> unix password sync = Yes
> syslog = 0
> log file = /var/log/samba/log.%m
> max log size = 1000
> dns proxy = No
> panic action = /usr/share/samba/panic-action %d
> idmap uid = 10000-20000
> idmap gid = 10000-20000
> winbind enum users = Yes
> winbind enum groups = Yes
> winbind use default domain = Yes
> .
>
> further, all other shares are working fine. here is my samba global.
>
>
>
>
>
> Thanks
here is what I use in my conf
[ProfileShare]
...
root preexec = /root/pdc/smbmkhomedir.sh %D %U
...
< smbmkhomedir.sh >
#!/bin/bash
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
fi
exit 0