summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrevor Gamblin <trevor.gamblin@windriver.com>2019-12-23 19:55:43 -0500
committerKhem Raj <raj.khem@gmail.com>2019-12-25 08:55:26 -0800
commitf29dfed64a56c9d952d18139d74adc1574ff79f4 (patch)
tree5cef8f05fae5f265f4b0af35e94fdd217103bf64
parent04b8b3916357537372a6e4aa016eda92b6d3d125 (diff)
downloadmeta-openembedded-f29dfed64a56c9d952d18139d74adc1574ff79f4.tar.gz
samba: disable guest access and anonymous queries
Guest accounts for Samba are a known potential vulnerability (see https://www.tenable.com/plugins/nessus/26919) where info about the host can be obtained without proper access. The option "map to guest = bad user" allows login attempts with usernames that don't exist to map to the guest account, while the "restrict anonymous" value (implicitly set to 0 before this patch) would allow any queries to obtain user and group list information. Raise the default security level by setting "restrict anonymous" to "1" and "map to guest" to "never" to avoid providing user/group info to unauthenticated users and reject login attempts with an invalid password, respectively. Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-networking/recipes-connectivity/samba/samba/smb.conf6
1 files changed, 5 insertions, 1 deletions
diff --git a/meta-networking/recipes-connectivity/samba/samba/smb.conf b/meta-networking/recipes-connectivity/samba/samba/smb.conf
index a0b87c3735..d6bde417fb 100644
--- a/meta-networking/recipes-connectivity/samba/samba/smb.conf
+++ b/meta-networking/recipes-connectivity/samba/samba/smb.conf
@@ -25,6 +25,10 @@
25 25
26## Browsing/Identification ### 26## Browsing/Identification ###
27 27
28# Prevent anonymous connections. Overriden if the user sets guest ok = yes
29# on any share
30 restrict anonymous = 1
31
28# Change this to the workgroup/NT-domain name your Samba server will part of 32# Change this to the workgroup/NT-domain name your Samba server will part of
29 workgroup = WORKGROUP 33 workgroup = WORKGROUP
30 34
@@ -114,7 +118,7 @@
114 118
115# This option controls how unsuccessful authentication attempts are mapped 119# This option controls how unsuccessful authentication attempts are mapped
116# to anonymous connections 120# to anonymous connections
117 map to guest = bad user 121 map to guest = never
118 122
119########## Domains ########### 123########## Domains ###########
120 124