Description
This is an issue I had crop up when attempting to override default unraid settings or add additional settings to unraid shares. Basically the samba configuration file is loaded top to bottom in order, and includes are handled inline following the same logic. This allows tiered configuration files to override one another for different settings and creates a robust settings architecture.
I want to override settings for several user shares to restrict wireguard clients to specific shares via IP, and to eventually create per-user storage volumes for quota based individual usage. Seems easy enough - add a new entry like so:
[ShareName] Key = Value
in the smb-extra configuration section in the settings menu!
The problem is that these settings are loaded before the unraid shares are defined, which means my new entry is defining the share:
/etc/samba/smb.conf:
# hook for user-defined samba config include = /boot/config/smb-extra.conf # auto-configured shares include = /etc/samba/smb-shares.conf
This is a problem because this new share has no path, so samba marks it unavailable and doesn't list it anymore:
testparm WARNING: No path in service Backups - making it unavailable! NOTE: Service Backups is flagged unavailable.
Simply reversing the order that these two conf files are included resolves this and allows settings to be overridden or added at will.
Steps to Reproduce:
- Add an entry matching the name of any existing Unraid auto-configured share to smb-extra.conf
- Restart the SMB service or stop/start the array
Recommended Comments
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.