[Samba] Include directory in smb.conf

Nico Kadel-Garcia nkadel at gmail.com
Thu Feb 9 15:14:04 MST 2012


On Thu, Feb 9, 2012 at 1:04 PM, Santiago Diez <santiago.diez at caoba.fr> wrote:
> Hi there,
>
> I'm wondering if there any patch or recent developement that would allow to
> include a directory rather than a file in smb.conf
>
> Something like
>
> includedir = /etc/samba/shares.d/
>
> instead of
>
> include = /etc/samba/shares.conf

That seems potentially destabilizing, and makes for considerably more
complex parsing of a target directory. In particular, order
sensitivity of included files is a pain in the ass and can be
enormously destabilizing.  And me, I'd be concerned that some idiot
would point to an auto-mounted or NFS-mounted directory and lead to
all *sorts* of timeout craziness.

This kind of approach is, of course, used for other tools like Nagios
and NRPE and httpd. But it can get very tricky to handle. If I had to
have a configuration for Samba built up from dynamically arranged
smaller components, I'd set up /etc/samba/Makefile, drop components in
/etc/samba/*.conf, and use it to build and source control
/etc/samba/smb.conf.

Do you have some particular need for this? Or did it just seem like a good idea?


More information about the samba mailing list