Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SVH] Add WINS Server and MasterBrowser options to SAMBA AddOn #3894

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions samba/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Changelog
## 12.4.1

- Add the option to enable SAMBA to become local browsermaster
- Add the option to enable SAMBA WINS Server
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From https://learn.microsoft.com/en-us/windows-server/networking/technologies/wins/wins-top:

Windows Internet Name Service (WINS) is a legacy computer name registration and resolution service that maps computer NetBIOS names to IP addresses.

If you do not already have WINS deployed on your network, do not deploy WINS - instead, deploy Domain Name System (DNS). [...]

Since even Microsoft considers WINS legacy, I don't think we should add support for it on our end.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MasterBrowser in my network helps with navigating my servers/shares.

wins is old, can live without.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks at least for considering


## 12.4.0

- Add the ability to enable and disable specific shares, improving user control over folder access
Expand Down
2 changes: 2 additions & 0 deletions samba/DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ veto_files:
- ".DS_Store"
- Thumbs.db
compatibility_mode: false
winsserver_mode: false
masterbrowser_mode: true
stefvanhooijdonk marked this conversation as resolved.
Show resolved Hide resolved
```

### Option: `workgroup` (required)
Expand Down
4 changes: 4 additions & 0 deletions samba/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ options:
- share
- ssl
compatibility_mode: false
winsserver_mode: false
masterbrowser_mode: true
veto_files:
- ._*
- .DS_Store
Expand All @@ -56,6 +58,8 @@ schema:
enabled_shares:
- "match(^(?i:(addons|addon_configs|backup|config|media|share|ssl))$)"
compatibility_mode: bool
winsserver_mode: bool
masterbrowser_mode: bool
veto_files:
- str
allow_hosts:
Expand Down
11 changes: 11 additions & 0 deletions samba/rootfs/usr/share/tempio/smb.gtpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
workgroup = {{ .workgroup }}
server string = Samba Home Assistant

{{ if .winsserver_mode }}
wins support = yes
{{ end }}

{{ if .masterbrowser_mode }}
domain master = yes
preferred master = yes
local master = yes
os level = 255
{{ end }}

security = user
ntlm auth = yes
idmap config * : backend = tdb
Expand Down
8 changes: 8 additions & 0 deletions samba/translations/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ configuration:
name: Enable Compatibility Mode
description: >-
Enable this to use old legacy Samba protocols on the Samba add-on.
masterbrowser_mode:
name: Enable Master Browser mode
description: >-
Enable Master Browser mode for the workgroup on this Samba add-on.
winsserver_mode:
name: Enable WINS Server
description: >-
Enable this to use old legacy WINS protocols on this Samba add-on.
veto_files:
name: Veto Files
description: List of files that are neither visible nor accessible.
Expand Down