I'm using zfs on linux, using the sharesmb=on option to try out the native smb share feature instead of adding the zfs tank path to my smb.conf file.

The share has shown up on my windows machines, but my windows users can't write to it. I think I'm making an assumption that the zfs smb interface is mapping my windows user to a linux user with the same name. I'd normally make a username map file to map the windows to linux user, but that seems unnecessary since the usernames are identical.

Does the native smbshare even use smb.conf, or are there zfs pool commands that apply samba settings?


ZFS on Linux uses the usershare feature of samba. So to make this work, you have to enable this in smb.conf by defining a directory for storing the usershare definitions

; directory for storing the usershare definitions. permissions
; of the directory govern who can use this.
usershare path = /var/lib/samba/usershares
usershare max shares = 100
usershare allow guests = yes
usershare owner only = no

and you have to actually create the directory

mkdir /var/lib/samba/usershares
chgrp foo /var/lib/samba/usershares
chmod 1770 /var/lib/samba/usershares

now restart smbd.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.