Lost config smb.conf on reboot

**NethServer Version: NethServer 7.9.2009
Module: SAMBA

After making some changes to the smb.conf file and restarting the server, the settings are lost, how can I change some parameters permanently?


Após fazer algumas mudanças no arquivo smb.conf e reiniciar o servidor as configurações são perdidas, como posso alterar alguns parâmetros em definitivo?

1 Like

You should read about custom-template, any configuration files are written from template



If you need some help with templates come back here, we’ll try to help you.


Thank you for supporting.
Below are the fields I would like to change, I looked at the link passed by @stephdl but I couldn’t understand how to do it …

# 10base
server string = NethServer 7.9.2009 final (Samba %v)

max log size = 50

# Idle time before disconnecting the client
deadtime = 10080

# Alias NETBIOS names, used to provide access to Samba via multiple hostnames
netbios aliases =

; 20inherit_owner -- Global setting, may be overridden (see home$ share definition)
inherit owner = yes

path = /var/lib/nethserver/home
administrative share = yes

; Home directories
comment = Home directories
browseable = no
writable = yes

path = /var/lib/nethserver/print_driver

There are to ways, I would prefer the second one.
First way is to copy the 10base file from




and do your changes at the file at templates-custom. At least you have to expand the template:

expand-template /etc/samba/smb.conf

The problem is, with an update of nethserver the file at templates perhaps is modified
But you won’t get this modification because the config only is written with your template-custom.

The second way is to create a new file at


for example named


and write your settings to this file.
If you do an

expand-template /etc/samba/smb.conf

the smb.conf will be created with the 10base file from templates and behind these settings your settings from 11MyGlobalSettings at templates-custom.

If you have to do some settings before the 10base you can create a file


for example.