I'm new to SAMBA, but have set up a SAMBA server on an Ubuntu 20.04 desktop, but consistently get Access Denied, when trying to map any SAMBA share from my Windows 11 laptop. How do I troubleshoot the problem? Here's what I believe to be the relevant parts of smb.conf:
[global]
server role = standalone server
obey pam restrictions = yes
security = user
encrypt passwords = true
map to guest = bad user
guest account = nobody
[media]
path=/data/media
valid users = @media
guest ok = no
writable = yes
browsable = yes
[public]
path=/data/public
valid users = @smbgroup
guest ok = no
writable = yes
browsable = yes
[documents]
path=/data/documents
valid users = @simon
guest ok = no
writable = yes
browsable = yes
[downloads]
path=/data/downloads
valid users = @media
guest ok = no
writable = yes
browsable = yes
Here are the permissions on the relevant shared folders:
root@KTchia01:/data# ls -l
total 100375
drwxrwx--- 8 simon simon 27 Jun 8 2021 documents
drwxrwx--- 2 simon simon 6 Jun 8 2021 downloads
drwxrwxr-x 16 simon media 17 Jun 10 2021 media
-rw-r--r-- 1 chia chia 102672297 Jun 8 2021 oldhome.tgz
drwxrwxrwx 2 simon smbgroup 2 Feb 5 21:20 public
I connect as the user simon from the Windows 11 laptop KTLAPTOP02, and simon is both an ordinary user on the linux box and has set a SMB password. Group memberships for simon:
root@KTchia01:~# grep simon /etc/group
adm:x:4:syslog,simon,chia
cdrom:x:24:simon
sudo:x:27:simon,chia
dip:x:30:simon
plugdev:x:46:simon
lpadmin:x:120:simon
lxd:x:131:simon
simon:x:1000:
sambashare:x:132:simon
smbgroup:x:1001:simon
plex:x:998:simon,plex
media:x:1002:simon,plex
chia:x:1003:simon
Log output, when trying to connect:
root@KTchia01:/var/log/samba# tail -f log.ktlaptop02
[2022/02/05 21:41:36.200402, 2] ../../source3/param/loadparm.c:2864(lp_do_section)
Processing section "[public]"
[2022/02/05 21:41:36.200454, 2] ../../source3/param/loadparm.c:2864(lp_do_section)
Processing section "[documents]"
[2022/02/05 21:41:36.200509, 2] ../../source3/param/loadparm.c:2864(lp_do_section)
Processing section "[downloads]"
[2022/02/05 21:41:36.212158, 1] ../../source3/smbd/service.c:362(create_connection_session_info)
create_connection_session_info: user 'simon' (from session setup) not permitted to access this share (IPC$)
[2022/02/05 21:41:36.212187, 1] ../../source3/smbd/service.c:543(make_connection_snum)
create_connection_session_info failed: NT_STATUS_ACCESS_DENIED
Can anyone point me in the right direction of how to further troubleshoot, why I get Access Denied, regardless of which share I try to access?