0

I've set up a Samba server on Linux (Ubuntu 17.04) to share files with my Windows computer.

The server is up and running, but what's strange is that I can only access the shared folder using the smbclient command from my Windows Subsystem for Linux environment:

smbclient //xxx.xxx.xx.xx/share  

However, when I use the Windows command line tools for Samba (which is the same as adding a drive map from Explorer):

net use \\xxx.xxx.xx.xx\share Z:  

After putting the same username/password as with the smbclient, I get an error message:

System error 5 has occurred.  
Access is denied.  

Nearly everything from my smb.conf is by default, and the only configurations I added were:

hosts allow = xxx.xx.xx.xx/24 127.0.0.1  

and

[share]  
path = /my/share/folder  
valid users = my_user  
read only = no  
writable = yes  
browsable = yes  
guest ok = no

(I also have used smbpasswd to set up the username and enabled samba in ufw )

  • Please can you provide all the non-comment lines from your smb.conf. (Different distributions seem to provide a different default file.) – roaima Feb 14 at 20:53
  • in smb.conf under the [global] section try adding max protocol = SMB2 – ron Feb 14 at 22:21
  • win10 disables SMB1 protocol by default, and your linux samba might be defaulting to SMB1. – ron Feb 14 at 22:22
  • What do the (relevant) log files under /var/log/samba say? – roaima Feb 14 at 23:49
  • - I think you mean 'min protocol = SMB2'. I already tried it didn't work. - Log doesn't say anything rather than 'Denied access from IP xxx.xxx.xx.xx'. Strange thing is that even for the smbclient access which did come thru it reports the same thing. – peidaqi Feb 15 at 21:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.