Uanble to connect to local Samba server

Dear all,

After many years of using other distro’s, this evening I’ve finally installed Tumbleweed (after being tempted for quite a while). Installation was a breeze!

What hasn’t been so easy is connecting to my local samba server… Via nautilus I get the following error:
“Failed to retrieve share list from server: No such file or directory”

And when I try the connection in CLI I get this:
“smbclient -L 192.168.1.72 -N
do_connect: Connection to 192.168.1.72 failed (Error NT_STATUS_IO_TIMEOUT)”

As per your instructions, my samba config is:

[global] 
  workgroup = WORKGROUP 
  netbios name = openSUSE-Desktop 
  server string = "" 
  name resolve order = bcast host lmhosts wins 
  local master = yes 
  preferred master = yes 
  os level = 65 
  passdb backend = tdbsam 
  printing = cups 
  printcap name = cups 
  printcap cache time = 750 
  cups options = raw 
  map to guest = Bad User 
  usershare allow guests = Yes 

The question is: what am I missing?

Thank you in advance!

Are you sure that the samba server can be reached via that IP address?

Try pinging that host

ping 192.168.1.72

If that gets successful responses and you have nmap installed, do

nmap 192.168.1.72

Report back with the results.

First of all thanks for taking the time to help me!

This is interesting: doing a ping test (with ping and nmap) would make you believe that the host is down - no connection can be established. However! I am perfectly able to ssh into the address, and my kodi-box is connecting fine with it over samba as well.

Could the host be blocked? I’ve added it to the /etc/hosts list as such:

192.168.1.72    samba

Well that is what this forum is about…all good. :wink:

This is interesting: doing a ping test (with ping and nmap) would make you believe that the host is down - no connection can be established.

Always best to show commands and output if possible. With the ‘nmap’ command, I would have expected port 445 tcp (and perhaps port 139 tcp) to be reported as open.

However! I am perfectly able to ssh into the address, and my kodi-box is connecting fine with it over samba as well.

Could the host be blocked? I’ve added it to the /etc/hosts list as such:

192.168.1.72    samba

Perhaps. Is the samba server in the form of a Linux host? Firewall blocking services?

Hm, it seems I am able to connect when entering the hosts address manually (with ctrl+L), but still unable via ‘WORKGROUP’ in Nautilus.

Nmap gives me the following:

map 192.168.178.72 
Starting Nmap 7.80 ( https://nmap.org ) at 2020-10-29 10:12 CET 
Nmap scan report for 192.168.178.72 
Host is up (0.0011s latency). 
Not shown: 997 closed ports 
PORT     STATE SERVICE 
139/tcp  open  netbios-ssn 
445/tcp  open  microsoft-ds 
8080/tcp open  http-proxy 
 
Nmap done: 1 IP address (1 host up) scanned in 0.07 seconds 

Additionally, I have added the samba server(s) to my FSTAB to mount them automatically on boot. The command ‘umount -a’ gives me no errors, but trying to navigate to the files via nautilus (again) gives me the following error:

The program is not installed setuid root - "user" CIFS mounts not supported.

I should probably give you the FSTAB-entries:

# samba servers 
//192.168.178.72/server/Server/Music /media/music cifs x-systemd.automount,noauto,rw,iocharset=utf8,guest,uid=jan,gid=jan,file_mode=0770,dir_mode=0770 0 0 
 
//192.168.178.72/server/Server/Videos/Films /media/movies cifs x-systemd.automount,noauto,rw,iocharset=utf8,guest,uid=jan,gid=jan,file_mode=0770,dir_mode=0770 0 0 
 
//192.168.178.72/server/Server/Videos/Series /media/series cifs x-systemd.automount,noauto,rw,iocharset=utf8,guest,uid=jan,gid=jan,file_mode=0770,dir_mode=0770 0 0

The reading/writings rights for /media are set accordingly, btw.

That’s as expected if SMB2 (or SMB3) is in use. Samba browsing via NetBIOS relied on the deprecated SMB1 protocol (now disabled by default).

The nmap output is as expected.

I see - better to leave it disabled then?

Any idea how I can fix the mount via FSTAB?

I have changed the ‘uid’ and ‘gid’ in /etc/fstab to ‘1000’, now I get the following error message:

mount.cifs: permission denied

Would this mean I am closer or further away from a solution?

uid = User id, get it with

id

, normally beginns this with 1000 in openSUSE

gid = group id of users get it also with

id

normally this is 100 in openSUSE

You are correct, my uid is 1000 (so that was correct), but gid was 100. However I still can’t mount my samba drives. :frowning:

I think I should be correct here, I can mount it under /run/user/1000/gvfs/* (done via nautilus), just not via ‘mount’ in an other folder. So I have a workaround for now.

I have tried the YaST Windows Domain Membership module as well, but that didn’t work either.

I am pretty sure there are some security options/configurations blocking me, probably something to do with trying to mount with guest access, but I can’t seem to figure out what it is.

It seems my intuition was correct, get the following log from samba:

[2020/10/29 18:31:55.702328,  0] ../../source3/smbd/server.c:1784(main) 
  smbd version 4.13.0-git.138.ff2d5480c67SUSE-oS15.5-x86_64 started. 
  Copyright Andrew Tridgell and the Samba Team 1992-2020 
[2020/10/29 18:31:55.739103,  1] ../../source3/profile/profile_dummy.c:30(set_profile_level) 
  INFO: Profiling support unavailable in this build. 
[2020/10/29 18:31:55.833159,  1] ../../source3/param/loadparm.c:2517(lp_idmap_range) 
  idmap range not specified for domain '*' 
[2020/10/29 18:31:55.833350,  0] ../../source3/auth/auth_util.c:1402(make_new_session_info_guest) 
  create_local_token failed: NT_STATUS_INVALID_PARAMETER_MIX 
[2020/10/29 18:31:55.833428,  0] ../../source3/smbd/server.c:2050(main) 
  ERROR: failed to setup guest info. 

Trying out the YaST Windows Domain Membership module to mount, I get the following error:

Failed to join domain: failed to lookup DC info for domain 'WORKGROUP' over rpc: {Access Denied} A process has requested access to an object but has not been granted those access rights.


To begin with I do not know much about MS Windows and thus about Samba, but when you can mount something somewhere, you can at least check wiith

mount | grep gvfs

what parameters are used for this successfull mount. Maybe you can learn something from it.

Just a wild suggestion.

That was helpful indeed! It uses fuse instead of cifs:

mount | grep gvfs 
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=100)

Can I change the mounting method in fstab to that as well? With the previous config?

Re-reading your post #6, I’m wondering, have you setup your automount configs? I noticed you have systemd.automount in your fstab. I’m just pulling at straws here.

Again, I am only saying very general comments, not particular about your case here.
But of course you can create an /etc/fstab entry with all the parameters you see in the present mount. But of course with maybe another mount point (do not forget to create the mount point and set the ownership to those needed).

No I haven’t, I just installed Tumbleweed and copied the samba related fstab entries from my previous Debian-based system (perhaps not a best practice). Could you point me in the right direction as to configuring automount correctly? Would that be ‘autofs’?

But of course you can create an /etc/fstab entry with all the parameters you see in the present mount. But of course with maybe another mount point (do not forget to create the mount point and set the ownership to those needed).

So I tried that, but it didn’t work. I got on error message saying it couldn’t find the samba directory:

sudo mount -a 
/bin/sh: //192.168.178.72/server/Server/Music: No such file or directory

But I assure you it’s there :wink:

Sorry, but please document your problem/trials complete. I am not seeing the /etc/fstab entry as it is now.
Also, better copy/paste the complete prompt/command line, the ouput and the next prompt. Then everybody can exact see, like you saw it, what happened.

BTW, as said, I am not a SAMBA guru, but I read in other threads that SAMBA protocol version one is switched off now in openSUSE. I read above that you base your configuration on an earlier Debian one. Could be that that one uses version one without saying so (because default). Maybe you have to switch it on in openSUSE. Either search the forums here for such a case or wait until more knowledgable people tune in about this.

Apologies! I should’ve added that, I agree. I edited it to the following line:

//192.168.178.72/server/Server/Music /media/music fuse fuse.gvfsd,rw,nosuid,nodev,relatime,gid=100,uid=1000,guest,file_mode=0770,dir_mode=0770 0 0 

Afterwards I ran:

sudo mount -a  /bin/sh: //192.168.178.72/server/Server/Music: No such file or directory

Troubleshooting I initially also found info on the outdated samba protocols (v1?), but even if I edit my /etc/samba/smb.conf accordingly

        
netbios name = jan-linux 
        server string = "" 
        name resolve order = bcast host lmhosts wins 
        local master = Yes 
        preferred master = Yes 
        os level = 65 
        passdb backend = tdbsam 
        printing = cups 
        printcap name = cups 
        printcap cache time = 750 
        cups options = raw 
        map to guest = Bad User 
        usershare allow guests = No 
        log level = 1 auth:3 
        wins support = Yes 
        security = user 
        domain logons = Yes 
        domain master = Yes 
        workgroup = WORKGROUP 
**        vers=1.0 **

it doesn’t mount via fstab, not with the gvfsd line posted above, nor with the following:

//192.168.178.72/server/Server/Music /media/music cifs x-systemd.automount,noauto,rw,iocharset=utf8,guest,gid=100,uid=1000,guest,file_mode=0770,dir_mode=0770 0 0 


Since it is a security risk I’ve disabled it since.

(thanks again for all your time btw)