Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 6 additions & 0 deletions samba/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 12.9.0

- Add configuration option to disable WSDD. When disabled, the wsdd service is
not started and the host is no longer advertised for automatic discovery.
Shares remain reachable by hostname or IP address.

## 12.8.1

- Normalize stored `enabled_shares` values to lower case at startup. Values
Expand Down
12 changes: 12 additions & 0 deletions samba/DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ compatibility_mode: false
apple_compatibility_mode: true
netbios: true
local_master: true
network_discovery: true
server_signing: "default"
veto_files:
- ._*
Expand Down Expand Up @@ -121,6 +122,17 @@ When NetBIOS is enabled, try and become a local master browser on a subnet.

Defaults to `true`.

### Option: `network_discovery`

Advertise the host on the network using Web Services Dynamic Discovery, so it
appears automatically under Network in Windows File Explorer. Disable this if
you connect to the shares by hostname or IP address and do not want the host
to announce itself on the network.

Disabling this has no effect on share availability; only on discovery.

Defaults to `true`.

### Option: `server_signing`

Configure the SMB server signing requirement. This option can improve security by requiring message signing, which helps prevent man-in-the-middle attacks.
Expand Down
4 changes: 3 additions & 1 deletion samba/config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
version: 12.8.1
version: 12.9.0
slug: samba
name: Samba share
description: Expose Home Assistant folders with SMB/CIFS
Expand Down Expand Up @@ -35,6 +35,7 @@ options:
apple_compatibility_mode: true
netbios: true
local_master: true
network_discovery: true
server_signing: "default"
veto_files:
- ._*
Expand All @@ -59,6 +60,7 @@ schema:
apple_compatibility_mode: bool
netbios: bool
local_master: bool
network_discovery: bool
server_signing: list(default|auto|mandatory|disabled)
veto_files:
- str
Expand Down
10 changes: 9 additions & 1 deletion samba/rootfs/etc/s6-overlay/scripts/enable-check.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/command/with-contenv bashio
# shellcheck shell=bash
# ==============================================================================
# Enable/disable nmbd service per config
# Enable/disable optional services per config
# ==============================================================================
if bashio::config.true 'netbios'; then
touch /etc/s6-overlay/s6-rc.d/user/contents.d/nmbd
Expand All @@ -10,3 +10,11 @@ else
rm -f /etc/s6-overlay/s6-rc.d/user/contents.d/nmbd
bashio::log.info "Service nmbd disabled"
fi

if bashio::config.true 'network_discovery'; then
touch /etc/s6-overlay/s6-rc.d/user/contents.d/wsdd
bashio::log.info "Service wsdd enabled"
else
rm -f /etc/s6-overlay/s6-rc.d/user/contents.d/wsdd
bashio::log.info "Service wsdd disabled"
fi
7 changes: 7 additions & 0 deletions samba/translations/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ configuration:
description: >-
When NetBIOS is enabled, try and become a local master browser on a
subnet.
network_discovery:
name: Enable network discovery
description: >-
Advertise the host with Web Services Dynamic Discovery so it appears
automatically under Network in Windows File Explorer. Disable if you
connect by hostname or IP address and do not want the host to announce
itself on the network. Shares stay reachable either way.
server_signing:
name: Server signing
description: >-
Expand Down
Loading