Skip to contentSkip to conversation

Fix SMB security configuration on newer samba versions

Qemu-devel Michael Büsch 2 participants 3 messages Oct 21, 2013 – Oct 27, 2013 Networking

lore
Share & tools
lore
#0 lore raw

The following changes fix the samba security configuration on newer samba versions.

samba version 4.0.10-Debian throws this warning:

Quoted 1 line

WARNING: Ignoring invalid value 'share' for parameter 'security'

Which makes it fall back to security=user without guest login.

Fix this by selecting 'user' explicitly and mapping unknown users to guest logins.

---

net/slirp.c +2 -1
Index: qemu-1.6.1/net/slirp.c
===================================================================
@@ -529,7 +529,8 @@
             "state directory=%s\n"
             "log file=%s/log.smbd\n"
             "smb passwd file=%s/smbpasswd\n"
-            "security = share\n"
+            "security = user\n"
+            "map to guest = Bad User\n"
             "[qemu]\n"
             "path=%s\n"
             "read only=no\n"
#1 lore raw
Quoted 19 lines · Michael Büsch

The following changes fix the samba security configuration on newer samba versions.

samba version 4.0.10-Debian throws this warning:

Quoted 1 line

WARNING: Ignoring invalid value 'share' for parameter 'security'

Which makes it fall back to security=user without guest login.

Fix this by selecting 'user' explicitly and mapping unknown users to guest logins.

---
Index: qemu-1.6.1/net/slirp.c
===================================================================

net/slirp.c 2013-10-21 13:49:39.918960448 +0200 line 533

Quoted 6 lines
net/slirp.c 2013-10-21 13:49:39.918960448 +0200 renamed from net/slirp.c 2013-10-09 21:20:32.000000000 +0200 +2 -1
@@ -529,7 +529,8 @@
             "state directory=%s\n"
             "log file=%s/log.smbd\n"
             "smb passwd file=%s/smbpasswd\n"
-            "security = share\n"
+            "security = user\n"
+            "map to guest = Bad User\n"

does this still work with old samba?

Quoted 3 lines
net/slirp.c 2013-10-21 13:49:39.918960448 +0200 renamed from net/slirp.c 2013-10-09 21:20:32.000000000 +0200 +0 -0
             "[qemu]\n"
             "path=%s\n"
             "read only=no\n"
#2 lore raw
Quoted 5 lines · On Sun, 27 Oct 2013 18:50:18 +0800 Amos Kong <[email protected]> wrote:
Quoted 5 lines

Index: qemu-1.6.1/net/slirp.c
===================================================================

net/slirp.c 2013-10-21 13:49:39.918960448 +0200 renamed from net/slirp.c 2013-10-09 21:20:32.000000000 +0200 +0 -0
@@ -529,7 +529,8 @@
Quoted 8 lines

net/slirp.c 2013-10-21 13:49:39.918960448 +0200 line 533

Quoted 6 lines
net/slirp.c 2013-10-21 13:49:39.918960448 +0200 renamed from net/slirp.c 2013-10-09 21:20:32.000000000 +0200 +2 -1
             "state directory=%s\n"
             "log file=%s/log.smbd\n"
             "smb passwd file=%s/smbpasswd\n"
-            "security = share\n"
+            "security = user\n"
+            "map to guest = Bad User\n"

does this still work with old samba?

I didn't test it on anything older.

I'd appreciate if somebody on the list with an older version could try it.

Signature · 1 line
Michael.