1

I've been trying to set up a samba share on my local network for 3 days now and I keep running in to the same problem. I'm sure it's something simple but I can't figure it out.

When I try to access it through my Windows 10 machine I get the following message:

\\192.168.1.10 is not accessible. You might not have permission to use this network resource.
Contact the administrator of this server to find out if you have access permissions. 
Multiple connections to a server or shared resource by the same user, 
using more than one user name, are not allowed. Disconnect all previous connections to the server or shared resource and try again. 

My Windows Credential Manager is empty.

I use the default [global] config and added the following to the bottom of the smb.conf file:

[media]
path = /mnt/media
browsable = yes
guest ok = yes
read only = no
create mask = 666
directory mask = 777
force user = sjonnie
force group = sjonnie

I created the user "sjonnie" and user 'smbpasswd -a sjonnie' to set a password.

File permissions (also tried nobody:nogroup):

drwxrwxrwx   4 sjonnie sjonnie       4096 May  8 17:59 mnt

Contents of mnt:

drwxrwxrwx 4 sjonnie sjonnie 4096 May  8 18:33 data
drwxrwxrwx 3 sjonnie sjonnie 4096 May  8 16:10 media

If you need any more information, ask and I will provide.

2
  • Which version of samba? if it is less than 4 then it's possible that you need to enable smb1 protocol in windows 10. Control panel->programs and features->turn windows features on/off. enable SMB 1 protocol and see if that helps. May 10, 2021 at 16:58
  • directory mask = 777 I hope samba does not allow this. Please use 770 (and 660 for files) There is no reason to open your system up to "others". Please also have a look in /var/log/ and if any file is updated when you try to connect. It might give a clue to what is happening
    – Rinzwind
    May 10, 2021 at 17:08

2 Answers 2

3

Thank you @Morbius1 for your help.

After few more hours of trying things I found the answer.

It turns out the problem wasn't with the Linux machine and therefore not with the Samba share.

My Windows 10 machine kept the shares I had previous in the background. I couldn't see them in the explorer but when I ran net use in the CMD I found there were 2 still linked (from previous mounting attempts). I then used net use * /delete to remove those.

Hope this helps someone else so he and or she doesn't waste 3 days pulling their hair out. If you have any questions, send me a message.

1

I've never seen this happen when the server only has one share especially one that allows guest access. Did you have a different share that required credentials at one point?

Anyway, The Linux samba server can be addressed 2 different ways: By ip address and my name ( mDNS or NetBIOS ). Windows regards these as two different hosts even though they are the same machine.

What I would do is address the Linux samba server by it's mDNS host name: \\hostname.local\media

Note:

[1] Run hostname on the Linux server to find the hostname of the machine then when you address it in Win10 add a .local at the end.

[2] Win10 can do mDNS by default. Ubuntu desktop can as well but if you are using Ubuntu Server you need to install a package:

sudo apt install avahi-daemon

[3] If you intend on keeping this as a guest accessible share I suggest removing sjonnie from the samba password database ( smbpasswd -x sjonnie ). I think this is contributing to the problem.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .