Score:0

Can't connect to samba from windows

br flag

Im having an issue with connecting to samba from windows.

This is the exact filepath im trying to connect to: \\192.168.1.242\server-sharedfiles.

Server-sharedfiles is the name of the folder i would like to share and the filepath is set in the config file to that folder like this: /home/server/server-sharedfiles/.

The error i get is that it thinks i typed it wrong.

config file:

workgroup = server server min protocol = NT1 server string = %h server (Samba, Ubuntu) netbios name = FileServer wins support = yes dns proxy = no

name resolve order = lmhots host wins bcast

interfaces = 192.168.0.1/24 eth0 bind interfaces only = yes

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

usershare allow guests = yes

[printers] comment = All Printers browseable = no path = /var/spool/samba printable = yes guest ok = no read only = yes guest ok = no read only = yes create mask = 0755

[print$] comment = Printer Drivers path = /var/lib/samba/printers browseable = yes read only = yes guest ok = no

[MY_SHARE] writeable = yes path = /home/server/server-sharedfiles comment = Fileserver guest account = wide links = no security = user

i have tried using \\192.168.1.242\MY_SHARE\ and that wont work either and gives this same error:

https://imgur.com/a/w5xPabR

winver on my pc outputs this:

https://imgur.com/a/2LddYUs

for samba vesion i get this:

server@VERUM-SERVER:/etc/samba$ samba --version Version 4.3.11-Ubuntu

https://imgur.com/a/BEvXaNL

ChanganAuto avatar
us flag
You typed it wrong indeed, it needs \\...
user1530845 avatar
br flag
its not that, it still gives the same err
ChanganAuto avatar
us flag
No, It IS that - double backslash instead of single at the beginning -, for starters. You may have other errors though. Please edit and post the configuration.
user1530845 avatar
br flag
ah my bad the forum inturprets a double backslash as a single one, and im still having the same issue even with the double backslash
sa flag
You are trying to connect to the path instead of the share, try replacing 'server-sharedfiles' with 'MY_SHARE'
user1530845 avatar
br flag
nope still the same issue, i edited the post with an image
Score:0
es flag

I'm not sure if what you posted above is a typo but I can reproduce your error easily by using one line from your smb.conf into mine:

name resolve order = lmhots host wins bcast

To be honest I wouldn't have thought it would make a mess of things since Samba generally ignores things that are incorrect but in this case it stops smbd from running:

:~$ sudo service smbd restart

Job for smbd.service failed because the control process exited with error code. See "systemctl status smbd.service" and "journalctl -xe" for details.

When I correct the line:

name resolve order = lmhosts host wins bcast

And restart smbd: sudo service smbd restart

I can access the share from Windows again.

Just make sure you address the share the way Rowland Penny mentioned above

user1530845 avatar
br flag
sry, i dont quite understand, you dont say what to change the line to, also im not getting any errors in ubuntu, or at least not over ssh
Morbius1 avatar
es flag
In the smb.conf on your Ubuntu machine you have a typo in your "name resolve order" line. One of the elements reads `lmhots` . It should be `lmhosts`. Make the change then restart smbd.
user1530845 avatar
br flag
ah ok thx i fixed it, still not working tho..., it gives the same "network name not found" error
Morbius1 avatar
es flag
Assuming [1] the ip address is correct and [2] you disabled your linux firewall ( ufw ) to see if it's in the way, the only thing left is Linux permissions on the shared folder and the path to it. So do a `ls -dl /home/server` and a `ls -dl /home/server/server-sharedfiles` to find out.
Score:0
jp flag

Without having all the information I suspect this is a case of Windows 10 requiring a higher level of SMB encryption than your SMB server allows. I'd check on your SMB server what version of SMB it supports first, then check what versions of SMB your windows machine supports.

Either your SMB server system would have to enable a higher version of SMB (not always possible), or your windows system would need the registry changed to allow (and match) the lower SMB version of the server.

This happens quite frequently with linux based SMB servers when accessing from Windows 10.

Posting what OS and version of SMB you're using would help, along with what version and build of Windows 10 you're using.

As an example, if your SMB server only had SMB 1.0 enabled: https://docs.microsoft.com/en-us/windows-server/storage/file-server/troubleshoot/smbv1-not-installed-by-default-in-windows

user1530845 avatar
br flag
winver on my windows comuter im using to connect shows this: https://imgur.com/a/2LddYUs. on my server i get this: (copy and paste) server@VERUM-SERVER:/etc/samba$ samba --version Version 4.3.11-Ubuntu
jp flag
This article shows how to get your SMB protocol version: https://www.thewindowsclub.com/check-smb-version-windows I haven't used Windows 11 so there are perhaps some new issues there. You can clearly get your linux samba version from this site: https://www.samba.org/samba/history/ .If you have version 4.3.11 that is a version from 2015 so it's likely something will need to be changed on the Windows side to support it. What is your linux OS, is it a NAS? Is there any way to update the samba version? If it's a NAS, sometimes there are newer firmwares you can install.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.