<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>How-to – Linux und Ich</title>
	<atom:link href="https://linuxundich.de/en/tag/how-to/feed/" rel="self" type="application/rss+xml" />
	<link>https://linuxundich.de/en</link>
	<description>A German Linux blog, in English</description>
	<lastBuildDate>Sun, 18 Oct 2026 15:46:40 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.3</generator>
	<item>
		<title>Samba for Sonos S1: Allowing SMB1 without throwing your whole home network wide open</title>
		<link>https://linuxundich.de/en/samba-sonos-s1-smb1-ntlmv1-secure-setup/</link>
					<comments>https://linuxundich.de/en/samba-sonos-s1-smb1-ntlmv1-secure-setup/#respond</comments>
		
		<dc:creator><![CDATA[Christoph Langner]]></dc:creator>
		<pubDate>Sun, 18 Oct 2026 15:46:40 +0000</pubDate>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Arch Linux]]></category>
		<category><![CDATA[homelab]]></category>
		<category><![CDATA[How-to]]></category>
		<category><![CDATA[Samba]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Sonos]]></category>
		<guid isPermaLink="false">https://linuxundich.de/en/?p=260</guid>

					<description><![CDATA[Older Sonos speakers only play your music collection over SMB1 and NTLMv1. A dedicated user, a read-only share, and a few lines in smb.conf keep the speakers playing without leaving the rest of your home server needlessly exposed.]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">If you still run first-generation Sonos speakers and keep your music collection on your own server, Samba quickly hands you a little problem: Without SMB1 and the old NTLMv1 login, the speakers won&#8217;t play a single track. That&#8217;s why the usual guides on the web simply turn everything back on that Samba switched off for good reason. But there&#8217;s a much cleaner way to do it, and you don&#8217;t have to give up your music.</p>



<h2 class="wp-block-heading">Why Sonos S1 still needs SMB1</h2>



<p class="wp-block-paragraph">I still have two Play:3, a Play:1, and a Connect:Amp on my network. All of them run the S1 software, for which Sonos only ships bug fixes these days. The speakers don&#8217;t just play streams, they also play my music collection from the server. According to a <a href="https://en.community.sonos.com/conversations/86047">discussion in the Sonos forum</a>, however, the S1 devices only have enough resources for SMBv1 – the old hardware simply can&#8217;t do more.</p>



<p class="wp-block-paragraph">Samba, on the other hand, retired the old protocol a long time ago. Since <a href="https://devel.samba.org/samba/history/samba-4.11.0.html">version 4.11</a>, <code>server min protocol</code> defaults to SMB2_02, and according to the <a href="https://www.samba.org/samba/security/CVE-2018-1139.html">Samba project</a>, NTLMv1 authentication has been disabled since version 4.5. The usual guides turn both back on globally with two lines. Sure, the speakers play after that, but they&#8217;re not the only ones who get the door held open for them.</p>



<p class="wp-block-paragraph">If you run an S2 system, you&#8217;re off the hook. Sonos added SMBv2 and SMBv3 there with version 13.4.1 in December 2021 and no longer speaks SMBv1 at all. S2 users can leave Samba&#8217;s defaults alone. The rest of this article is for everyone who, like me, is still attached to their old speakers and doesn&#8217;t want to throw them out over a protocol.</p>



<h2 class="wp-block-heading">What&#8217;s wrong with the quick fix</h2>



<p class="wp-block-paragraph">Samba can only allow SMB1 for the whole server, not for individual shares or devices. Ever since WannaCry exploited a hole in Microsoft&#8217;s SMB1 in 2017 at the latest, the protocol has been considered legacy baggage, and NTLMv1 makes it easy for attackers to crack captured logins. If the speaker then logs in with your regular user on top of that, it&#8217;s your main password of all things that travels across the network using the weakest method available.</p>



<p class="wp-block-paragraph">On top of that come lines that people like to copy along while they&#8217;re at it. With <code>wide links</code> and <code>allow insecure wide links</code>, Samba follows symlinks even when they point outside the share. Often the entire data directory is shared writable, too. Sure, from the outside a little home server like this is usually locked down. But the same LAN is also home to TVs, smart plugs, and speakers whose software you have no control over.</p>



<h2 class="wp-block-heading">A dedicated user just for Sonos</h2>



<p class="wp-block-paragraph">The most important step is a dedicated user that exists only for the speakers and isn&#8217;t allowed to do anything else. It needs neither a home directory nor a shell; Samba only knows it for logging in. You set the password once and don&#8217;t use it anywhere else, because with NTLMv1 you should consider it semi-public. Creating it from scratch takes two commands:</p>



<pre data-lui-lang="bash" class="wp-block-code"><code>$ sudo useradd -r -M -s /usr/bin/nologin sonos
$ sudo smbpasswd -a sonos</code></pre>



<p class="wp-block-paragraph">If you already have a user the speakers log in with, trim it down with <code>usermod</code>. It loses its shell and gets <code>/</code> as its home directory and a locked Unix password. Logging in to Samba uses the separate password from <code>smbpasswd</code> and keeps working regardless. If your speakers have been using your regular user so far, however, you&#8217;re better off creating a new one:</p>



<pre data-lui-lang="bash" class="wp-block-code"><code>$ sudo usermod -s /usr/bin/nologin -d / sonos
$ sudo passwd -l sonos</code></pre>



<h2 class="wp-block-heading">The smb.conf</h2>



<p class="wp-block-paragraph">The configuration allows SMB1 and NTLMv1 but fences in everything around it. Samba only listens on the LAN interface and not on Docker bridges or VPN tunnels. Guests are kicked out, there are no printers, and every share gets a list of users who are allowed in. You&#8217;ll of course have to adapt the name of the network interface (<code>enp0s25</code> on my machine) and the paths to your system:</p>



<pre data-lui-lang="ini" data-lui-file="smb.conf" class="wp-block-code"><code>[global]
   workgroup = WORKGROUP
   server string = bender
   server role = standalone server

   # Sonos S1: nur SMB1 + NTLMv1
   server min protocol = NT1
   server max protocol = SMB3
   ntlm auth = ntlmv1-permitted

   # nur LAN und lokal, nicht auf den Docker-Bridges
   interfaces = lo enp0s25
   bind interfaces only = yes

   map to guest = never

   # keine Drucker
   load printers = no
   printing = bsd
   printcap name = /dev/null
   disable spoolss = yes

[homes]
   browseable = no
   writable = yes
   valid users = %S
   invalid users = sonos

[musik]
   path = /data/musik
   browseable = yes
   read only = yes
   valid users = sonos anna ben lena

[data]
   path = /data
   writable = yes
   valid users = anna ben</code></pre>



<p class="wp-block-paragraph">By the way, <code>ntlmv1-permitted</code> is just the more descriptive name for the old <code>yes</code>. The <code>[musik]</code> share (German for music) is read-only; <code>sonos</code> and the family, here <code>anna</code>, <code>ben</code>, and <code>lena</code>, are allowed to read it. Even if someone cracks the speaker&#8217;s login, all they get is the music. Only <code>anna</code> and <code>ben</code> can access <code>[data]</code>, <code>wide links</code> doesn&#8217;t appear anywhere, and symlinks therefore stay within their share.</p>



<p class="wp-block-paragraph">The line <code>invalid users = sonos</code> under <code>[homes]</code> matters, too. This share offers every user their home directory, and for the speaker user that&#8217;s the root directory after the <code>usermod</code> above. Without that line, there would be a writable share <code>\\bender\sonos</code> covering the entire system. What actually works there is still governed by file permissions, but directories like <code>/tmp</code> are open to everyone.</p>



<p class="wp-block-paragraph">If you can&#8217;t set up the Sonos library from scratch right now, there&#8217;s also an intermediate step without a separate music share. In that case, add <code>sonos</code> to the <code>valid users</code> of the existing share and also set <code>read list = sonos</code>. The speaker can then still read everything the file permissions allow, but can&#8217;t write anything. In the long run, though, a separate share is clearly the better choice.</p>



<p class="wp-block-paragraph">Before you activate the new file, have <code>testparm</code> check it. It complains about typos and unknown options before Samba trips over them. Then restart the service – on Arch it&#8217;s called <code>smb</code>, on Debian and Ubuntu <code>smbd</code>. Open connections drop briefly, but mounted shares on your computers usually reconnect on their own:</p>



<pre class="wp-block-code"><code>$ sudo testparm -s
$ sudo systemctl restart smb</code></pre>



<h2 class="wp-block-heading">The music library in the Sonos app</h2>



<p class="wp-block-paragraph">Finally, add the share as a music library in the S1 app. Open <em>Settings</em> and go to <em>Music Library</em> and <em>Music Library Setup</em>. Enter the share in Windows format as the path, i.e. <code>\\bender\musik</code>, followed by the user <code>sonos</code> and its password. Sonos then indexes the collection, which can take a while for large libraries.</p>



<figure data-wp-context="{&quot;galleryId&quot;:&quot;6ad521fe55295&quot;}" data-wp-interactive="core/gallery" class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex">

<figure data-wp-context="{&quot;imageId&quot;:&quot;6ad521fe59b34&quot;}" data-wp-interactive="core/image" data-wp-key="6ad521fe59b34" class="wp-block-image size-large wp-lightbox-container"><img fetchpriority="high" decoding="async" height="1024" sizes="(max-width: 456px) 100vw, 456px" srcset="https://linuxundich.de/wp-content/uploads/2026/10/01-s1-app-musikbibliothek-456x1024.webp 456w, https://linuxundich.de/wp-content/uploads/2026/10/01-s1-app-musikbibliothek-640x1436.webp 640w, https://linuxundich.de/wp-content/uploads/2026/10/01-s1-app-musikbibliothek-684x1536.webp 684w, https://linuxundich.de/wp-content/uploads/2026/10/01-s1-app-musikbibliothek-768x1724.webp 768w, https://linuxundich.de/wp-content/uploads/2026/10/01-s1-app-musikbibliothek-912x2048.webp 912w, https://linuxundich.de/wp-content/uploads/2026/10/01-s1-app-musikbibliothek.webp 1080w" width="456" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://linuxundich.de/wp-content/uploads/2026/10/01-s1-app-musikbibliothek-456x1024.webp" alt="Music library settings in the Sonos S1 app"/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button><figcaption class="wp-element-caption">In the S1 app, you add the Samba share as a new folder for the music library.</figcaption></figure>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6ad521fe59e54&quot;}" data-wp-interactive="core/image" data-wp-key="6ad521fe59e54" class="wp-block-image size-large wp-lightbox-container"><img decoding="async" height="1024" sizes="(max-width: 456px) 100vw, 456px" srcset="https://linuxundich.de/wp-content/uploads/2026/10/02-s1-app-freigabe-anmeldung-456x1024.webp 456w, https://linuxundich.de/wp-content/uploads/2026/10/02-s1-app-freigabe-anmeldung-640x1436.webp 640w, https://linuxundich.de/wp-content/uploads/2026/10/02-s1-app-freigabe-anmeldung-684x1536.webp 684w, https://linuxundich.de/wp-content/uploads/2026/10/02-s1-app-freigabe-anmeldung-768x1724.webp 768w, https://linuxundich.de/wp-content/uploads/2026/10/02-s1-app-freigabe-anmeldung-912x2048.webp 912w, https://linuxundich.de/wp-content/uploads/2026/10/02-s1-app-freigabe-anmeldung.webp 1080w" width="456" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://linuxundich.de/wp-content/uploads/2026/10/02-s1-app-freigabe-anmeldung-456x1024.webp" alt="Entering the share path, user name, and password in the Sonos S1 app"/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button><figcaption class="wp-element-caption">The share login is the dedicated user sonos, not your regular user.</figcaption></figure>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6ad521fe5a106&quot;}" data-wp-interactive="core/image" data-wp-key="6ad521fe5a106" class="wp-block-image size-large wp-lightbox-container"><img decoding="async" height="1024" sizes="(max-width: 456px) 100vw, 456px" srcset="https://linuxundich.de/wp-content/uploads/2026/10/03-s1-app-bibliothek-eingelesen-456x1024.webp 456w, https://linuxundich.de/wp-content/uploads/2026/10/03-s1-app-bibliothek-eingelesen-640x1436.webp 640w, https://linuxundich.de/wp-content/uploads/2026/10/03-s1-app-bibliothek-eingelesen-684x1536.webp 684w, https://linuxundich.de/wp-content/uploads/2026/10/03-s1-app-bibliothek-eingelesen-768x1724.webp 768w, https://linuxundich.de/wp-content/uploads/2026/10/03-s1-app-bibliothek-eingelesen-912x2048.webp 912w, https://linuxundich.de/wp-content/uploads/2026/10/03-s1-app-bibliothek-eingelesen.webp 1080w" width="456" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://linuxundich.de/wp-content/uploads/2026/10/03-s1-app-bibliothek-eingelesen-456x1024.webp" alt="Music library in the Sonos S1 app after indexing"/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button><figcaption class="wp-element-caption">Once indexing is done, the music collection from the home server shows up in the Sonos app.</figcaption></figure>

</figure>



<h2 class="wp-block-heading">Checking the result</h2>



<p class="wp-block-paragraph"><code>smbstatus</code> shows you whether everything works as intended. The <em>Protocol Version</em> column tells you who is connected with which protocol. Regular computers should keep connecting via SMB3 – my notebook, for example, uses SMB3_11 – and only the speakers show up with NT1. A guest login without a password, on the other hand, should bounce off with <code>NT_STATUS_ACCESS_DENIED</code> when you try it with <code>smbclient</code> from another computer:</p>



<pre class="wp-block-code"><code>$ sudo smbstatus -b
$ smbclient -N //bender/data -c ls</code></pre>



<p class="wp-block-paragraph">Don&#8217;t let the output of the second command mislead you. The line &#8220;Anonymous login successful&#8221; sounds like an open door, but it only concerns the connection to the server itself, which a client uses to fetch the list of shares, for example. The second line is what counts, because nobody gets into the share itself without a user name and password:</p>



<pre class="wp-block-code"><code>$ smbclient -N //bender/data -c ls
Anonymous login successful
tree connect failed: NT_STATUS_ACCESS_DENIED</code></pre>



<p class="wp-block-paragraph">On my server it looks like this: The speaker in the bedroom reads as <code>sonos</code> via NT1, while the notebook is connected with SMB3_11 and a signed connection. That&#8217;s exactly how it should be, because the old protocol stays limited to the devices that can&#8217;t do anything else. The other speakers only show up while they&#8217;re actually accessing the library:</p>



<pre class="wp-block-code"><code>$ sudo smbstatus -b

Samba version 4.25.0
PID     Username     Group        Machine                                   Protocol Version  Encryption           Signing              
----------------------------------------------------------------------------------------------------------------------------------------
732192  sonos        sonos        192.168.0.60 (ipv4:192.168.0.60:38427)    NT1               -                    -                    
711090  anna         anna         192.168.0.191 (ipv4:192.168.0.191:52826)  SMB3_11           -                    partial(AES-128-CMAC)</code></pre>



<h2 class="wp-block-heading">And in the long run?</h2>



<p class="wp-block-paragraph">Of course, I&#8217;m still not entirely happy with SMB1. My server already runs <a href="https://github.com/simojenki/bonob">bonob</a>, which brings Navidrome into the Sonos app as a music service. If the music comes through that, no speaker needs a Samba share anymore, and SMB1 could go for good. But if you can&#8217;t do without Sonos&#8217;s built-in library, the restricted setup is a good compromise in my view.</p>



<p class="wp-block-paragraph">All in all, the clean approach only costs you one user and a few extra lines in <code>smb.conf</code>. The speakers play just as well as with the quick fix, except that they no longer offer a path to the rest of the server. How did you hook up your old Sonos speakers? Is SMB1 still running on your network, too, or did you switch to S2 long ago?</p>
<hr><p>☕ <strong>Support Linux und Ich</strong><br>Thanks for reading <a href="https://linuxundich.de/en/">Linux und Ich</a>. If you enjoy the blog and would like to support my work, you will find more information on the <a href="https://linuxundich.de/en/support/">donation page</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://linuxundich.de/en/samba-sonos-s1-smb1-ntlmv1-secure-setup/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
