Kaput1982 Posted February 20, 2018 Posted February 20, 2018 I've been scouring the forum, trying to find a way to do this but so far I have been unsuccessful. Everything I find refers to samba-extra.conf, but as far as I can tell this only applies settings to the [global] section of smb.conf. I specifically want to set hosts allow for one share, and not the others. I poked around in /boot/config/shares/ but I didn't see anything in the .cfg* files that looked promising. I found this thread but I don't know if it was ever implemented. My only other thought is to hack together some kind of bash script using sed and add my configuration changes after boot. I don't relish the thought of trying to figure that out. If any one has any thoughts, pointers, or knows of something I've missed I'm all ears. Let me know if I've been unclear or can provide more information. Edit - I just realized I failed to mention I'm running Unraid 6.4.1
trurl Posted February 20, 2018 Posted February 20, 2018 Have you tried a search on "smb-extra"? There are definitely examples on the forum that apply to specific shares.
Kaput1982 Posted February 20, 2018 Author Posted February 20, 2018 I have done a search for "smb-extra". The examples I've found of specific shares all seem to revolve around shares mounted outside the array. In this case I created the share from the web interface. If I remove the share I created on the web interface and manually create one using smb-extra how do the "split level" settings apply?
trurl Posted February 20, 2018 Posted February 20, 2018 8 hours ago, Kaput1982 said: I have done a search for "smb-extra". The examples I've found of specific shares all seem to revolve around shares mounted outside the array. In this case I created the share from the web interface. If I remove the share I created on the web interface and manually create one using smb-extra how do the "split level" settings apply? Any folder at the root of cache or array drives is a user share whether you explicitly create it from the web interface or not. If you don't make any settings to a user share it will have default settings. Split level only applies to user shares as defined above.
Kaput1982 Posted February 21, 2018 Author Posted February 21, 2018 Thanks for your help @trurl I figured out a way to do this with a bash script, so I'll mark this as solved. For posterity sake here is the command: sed '/\[ShareName\]/a\\thosts allow = xxx.xxx.xxx.xxx' /etc/samba/smb-shares.conf > temporary file After that remove the smb-shares.conf file, replace it with the temporary file and restart samba. It's a bit hacky, and I haven't figured out how to get it to run after the array comes up but I'll keep plugging away at that part.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.