I'm trying to configure samba to share folders on my network publicly, however I also want private folders. I have ran into a problem where when I create the samba account access to all the shares are denied if your login as a samba user.
I'm connecting from a windows 10 PC
The file system is running Devuan 2.0.0 (a fork of Debian)
Here is what is contained in the samba.conf
[global]
workgroup = WORKGROUP
dns proxy = no
map to guest = Bad User
log file = /var/log/samba/log.%m
max log size = 100
server role = standalone server
passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
pam password change = yes
map to guest = bad user
usershare allow guests = yes
unix extensions = no
[Public]
comment = pubic share
hosts allow = 1.1.1.100/24, 127.0.0.1
hosts deny = 0.0.0.0/0
path = /mnt/Niflheim/Public
public = yes
read only = yes
guest ok = yes
guest only = no
[Private]
comment = home share
hosts allow = 1.1.1.100/24, 127.0.0.1
hosts deny = 0.0.0.0/0
path = /mnt/Niflheim/Home
valid users = USER, @USERGROUP
read only = no
browsable = no
writeable = yes
writeable list = USER
As an example if I create a samba account called USER and login as that then I can't access any shares but if I don't login all public shares are available.
Best Answer
This just turned out to be a problem with my computer and nothing wrong with the smb share. Their is something wrong with how my computer is communicating with my dns server,
Just fixed it by reinstalling windows