I freshly installed Debian 8 (Jessie) on a virtual machine. I installed the Samba 4.1.17 server with the intention to have shared folders on my network. I didn't change anything to the configuration, except that the following lines have been added to the end of the /etc/samba/smb.conf
file:
[public]
comment = HTTPD public directory
read only = no
locking = no
path = /var/www
guest ok = no
I added my users with smbpasswd
and made sure the users have 777 priviliges on the /var/www
directory.
I can list the shares with smbclient -L \\\\debian64-plankje
from both localhost as remotely from my old Debian 7 VM. (debian64-plankje
is the hostname of the server)
If I set guest ok = yes
then I can anonymously connect to the share with smbclient \\\\debian64-public\\public
, but with guest ok = no
set I get the error tree connect failed: NT_STATUS_ACCESS_DENIED
.
An extensive Google search didn't give me any hints to resolve this issue which I have trying to resolve for the last few hours. Just like with my old server I used the default configuration to which I only added above mentioned lined.
Below are the contents of my smb.conf
file, hopefully you can help me figure out why I get the NT_STATUS_ACCESS_DENIED
error.
[global]
workgroup = WORKGROUP
dns proxy = no
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
server role = standalone server
passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes
map to guest = bad user
[homes]
comment = Home Directories
browseable = no
read only = yes
create mask = 0700
directory mask = 0700
valid users = %S
[printers]
comment = All Printers
browseable = no
path = /var/spool/samba
printable = yes
guest ok = no
read only = yes
create mask = 0700
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = yes
guest ok = no
[public]
comment = HTTPD public directory
read only = no
locking = no
path = /var/www
guest ok = no
WORKGROUP\user
?