Samba include placement

include allows you to include another configuration file in a configuration file. The document is written as direct as being inserted.
It accepts a standard variable substitution, in addition to% u,% P and% S.
But actual moment really can only load a specific file, can not traverse directories. However, further testing may be found include nested loaded!
First create a new conf directory, which lost in a shares.conf, written on the inside
include = /etc/samba/conf/homes.share
include = /etc/samba/conf/printers.share
Then the original smb.conf inside the [homes] and [printers] section is cut content to homes.share and printers.share file, and then write the last line in smb.conf
include = /etc/samba/conf/shares.conf
Restart smbd, just like the original only as a smb.conf! Later add the specific configuration of sharing the same name .share write a file, then include it in shares.conf years to come on it.

Guess you like

Origin www.cnblogs.com/bongem/p/12099718.html