Please help setting up SMB

Status
Not open for further replies.

zoomzoom

Guru
Joined
Sep 6, 2015
Messages
677
@Poppa If you did not change NetBIOS as I mentioned yesterday, that is the problem
 

Poppa

Explorer
Joined
Jun 3, 2017
Messages
87
@Poppa If you did not change NetBIOS as I mentioned yesterday, that is the problem

The problem with that is that I am going to have 5 servers, all of which may be running FreeNAS and so to avoid the obvious confusion, each server needs to have a more unique identifier than "freenas" for the host name and netbios name. So I just changed the hostname to match my netbios name and everything seems to be working there.

Now on to the first and most important issue which people seem to be ignoring. The root directory is "/nmt" right? Would it be better to point one share to the root? Or would it be better to point it to "/nmt/Music"? Or would it be better to have multiple shares pointing to each kind of content in the pool like "/nmt/Music/Porn" or "/nmt/Music/Misc"?

And how does this fit in with the permissions stuff. Because the shares and datasets are using Windows permissions but per others in this thread, I have set "/nmt/Music" to Unix permissions.
 

zoomzoom

Guru
Joined
Sep 6, 2015
Messages
677
The problem with that is that I am going to have 5 servers, all of which may be running FreeNAS and so to avoid the obvious confusion, each server needs to have a more unique identifier than "freenas" for the host name and netbios name.
Right... While your end result is the same, the NetBIOS name should match the hostname, however most don't use NetBIOS and it's not required for SMB.

Now on to the first and most important issue which people seem to be ignoring. The root directory is "/nmt" right? Would it be better to point one share to the root? Or would it be better to point it to "/nmt/Music"? Or would it be better to have multiple shares pointing to each kind of content in the pool like "/nmt/Music/Porn" or "/nmt/Music/Misc"?
No one is ignoring you, and as I mentioned yesterday, all one needs to do is utilize google, or your search engine of choice. None of us mind helping people, but you're refusing to help yourself by not doing basic research via a search engine (or forum search for that matter).
  • Most of what you're asking for answers on is basic information on FreeBSD/NAS & Samba that can be easily found by utilizing a search engine.
 
Last edited:

diedrichg

Wizard
Joined
Dec 4, 2012
Messages
1,319
When I built my pool 4? 5? years ago, I did it wrong and put the share on /mnt/poolname. With >=v9.10.x, that's a no-no. So... A few weeks ago, I finally got around to remapping my datasets to be nested under a single dataset that would act as a share. Now my pool looks like

/mnt/poolname/shared
with various datasets under that (which I want those users who have access to that share, to be able to see those datasets.)

Shares are yet another way of limiting access to your server in addition to dataset permissions. Multiple shares are not a bad thing...

P.S. I've never used Windows permissions, I've always just used UNIX permissions and all has worked out fine for me.
 

Poppa

Explorer
Joined
Jun 3, 2017
Messages
87
Right... While your end result is the same, the NetBIOS name should match the hostname, however most don't use NetBIOS and it's not required for SMB.

Actually I think it is because FreeNAS won't let me have a blank netbios field.

No one is ignoring you, and as I mentioned yesterday, all one needs to do is utilize google, or your search engine of choice. None of us mind helping people, but you're refusing to help yourself by not doing basic research via a search engine (or forum search for that matter).
  • Most of what you're asking for answers on is basic information on FreeBSD/NAS & Samba that can be easily found by utilizing a search engine.

Tried that. The problem is that unless I know what to search for, I am not going to be able to find what I am looking for. All I really want is for this server to be available to Windows as one single network drive.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Actually I think it is because FreeNAS won't let me have a blank netbios field.
Samba doesn't either. It defaults to making your server's netbios name the same as the first component of its DNS name, which is broadly-speaking, the correct thing to do. If you want an additional netbios name for the server, you should add a netbios alias.
Tried that. The problem is that unless I know what to search for, I am not going to be able to find what I am looking for. All I really want is for this server to be available to Windows as one single network drive.
I typically won't share out the main dataset of my zpool. In your case "/mnt/music". I'd create a dataset "/mnt/music/smb" (for example), and then share that via SMB.
  • /mnt/music = Unix permissions
  • /mnt/music/smb = Windows permissions
Then set the dataset /mnt/music/smb so that it's owned by an appropriate user / group.
Since you've already been mucking around with permissions on /mnt/music, after changing its permissions type, I'd do the following:
  1. Nuke any existing ACL via the command setfacl -b /mnt/music.
  2. Make sure that "other" has the "x" permission bit on /mnt/music chmod o+x /mnt/Music (this is required for users to be able to access the share).
  3. Use the FreeNAS UI to change the owner of /mnt/music/smb to something appropriate.
  4. Then apply default permissions on your share winacl -a reset -r -p /mnt/music/smb
Now the permissions on your FreeNAS shares are in a default state. Owner has full control. Owner-Group has full control. Everyone else has read only access.

Unfortunately, windows caches credentials for mapped network drives. Unmap ALL network drives from the Windows client. If you're feeling particularly lazy, you can open powershell on the windows computer and type net use * /DELETE. Perhaps give the Window client a kick to be on the safe side (reboot it).

Now windows should have mostly cleared its cache. You can now access your server and fine-tune permissions.
Navigate to \\<server-name>\ and authenticate using appropriate credentials. Once you're there, right-click on the share, click properties, open the security tab, and fine-tune those permissions as needed.
Then open the share and create necessary subdirectories.
 
Status
Not open for further replies.
Top