SBM.CONF where's that file ?

profwalken

Patron
Joined
Nov 19, 2013
Messages
410
Hi,
I'd like to know where to find smb.conf on TN12 and how to edit the file .
all my google search are failed to find something.
 

Pitfrr

Wizard
Joined
Feb 10, 2014
Messages
1,531
When I had some issues with SMB and tried to debug it... I found a smb4.conf in /etc/local.
I just checked, it can also be found in TrueNAS at the same location.
 

profwalken

Patron
Joined
Nov 19, 2013
Messages
410
Thanks, i found it where you said it was, but now, my question is about its content.
I need to add a directive to allow a range of IPs coming from VPN , do you know how to do that ?
 

Pitfrr

Wizard
Joined
Feb 10, 2014
Messages
1,531
I need to add a directive to allow a range of IPs coming from VPN , do you know how to do that ?
That's my cue for leaving.... :smile:

I never edited the smb.conf file. While troubleshooting, I had a look at it to check if I could see anything out of the ordinary.... but since I don't really know that configuration file, my reference for "ordinary" was rather relying on luck! :-D

I found this article about the smb.conf file though, it might interest you (if you haven't seen it yet).
Maybe the hosts allow option is what you're looking for (more details here) but if my memory is right, the hosts allow option is also available in the GUI of Free/TrueNAS so you shouldn't have to edit the smb.conf file.
In any cases, I would try to do everything over the GUI first before tinkering with that configuration file...
 

Fredda

Guru
Joined
Jul 9, 2019
Messages
608
There is a hosts allow / hosts deny section in the configuration for each share if you enter advanced mode.

Editing the smb.conf directly is not a good idea, as it will be overwritten as soon if you do any SMB changes via the GUI.
If you need some options which are not directly configurable via the GUI there is always the Auxiliary Paramters field.
 

Forssux

Explorer
Joined
Mar 13, 2013
Messages
67
@Fredda yes this is possible but you can't add a new section. everything is under the global section.
I need to add a new section. where is the database located that alters /usr/local/etc/smb4.conf the moment you reboot or restart the smb service.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,553
@Fredda yes this is possible but you can't add a new section. everything is under the global section.
I need to add a new section. where is the database located that alters /usr/local/etc/smb4.conf the moment you reboot or restart the smb service.
If you need to add something to the global section, you can do through auxiliary parameters under Services->SMB.

Adding a new section is accomplished via adding a share.
 
Top