Quantcast
Channel: linuxadmin: Expanding Linux SysAdmin knowledge
Viewing all articles
Browse latest Browse all 17856

Creating a dir via samba winbind

$
0
0

So, I gave up on sssd. I will do that later down my career. Now I got winbind and samba working. My windows machine can access the linux fileserver using AD credentials.

My smb.conf looks like the follows.

[global-edeng] path=/data/home1 writable = yes valid users = edeng create mask = 0640 directory mask = 0750 [global-bgops] path=/data/home2 writable = yes valid users = bgops create mask = 0640 directory mask = 0750 

1) With my current configuration, somehow the users isn't able to write anything, unless i manually chown root:"domain user /data/home1" and chmod 670 /data/home1

So as of now, everytime I got a new user, I will have to create a new home dir in /data and edit smb.conf (note, if I don't specify valid users, then everyone can access it). How can I make it so that whenever a user try to access the fileserver using their credentials. It will create a directory (if it's not already created) in /data/home/ and only the user corresponding to that dir can access it? like the following:

[global-$user] path=create /data/home/<$user> writable = yes valid users = <$user> create mask = 0640 directory mask = 0750 

My current solution is to use puppet to parse wbinfo -u then from that info mkdir the corresponding folder in /data/ then edit smb.conf

submitted by /u/juniorsysadmin1
[link] [comments]

Viewing all articles
Browse latest Browse all 17856

Trending Articles