Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Can't connect to SAMBA share

  1. #1
    Join Date
    Mar 2009
    Location
    Sacramento, CA
    Beans
    644
    Distro
    Xubuntu

    Can't connect to SAMBA share

    I have two Samba shares on my Xubuntu 24.04 desktop, and can connect to them from my son's Windows 10 machine. However, from my Xubuntu 24.10 laptop, when I open Thunar and enter smb://%computername%, it asks what application I want to use to open it. It offers samba-tool, but when I select that the dialog box goes away but nothing happens, and it never connects to my desktop. What have I missed?

  2. #2
    Join Date
    Mar 2010
    Location
    Been there, meh.
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Can't connect to SAMBA share

    MSFT changed how they do share discovery a few years ago. It used to be through broadcasting "I'm here" all the time, but with internet scaling and corporate networks with many thousands of computers, that didn't scale. I have these notes for Win10 clients to be able to find Linux Samba shares:
    Install Samba, WS-Discovery tool, and Avahi:
    Code:
      sudo apt update
      sudo apt install samba wsdd avahi-daemon
    Make it so Windows can discover and connect to it by installing WS-Discovery and use Avahi so DNS isn't needed, but {hostname}.local will be the name used.

    If your hostname is xubu-linux, then other computing machines can see it as xubu-linux.local. That's the theory.

    Between Linux systems, the best way to connect to a Samba share is by setting up credentials and placing a mount line in the /etc/fstab. You can search these forums for more details about that, if you want to go that direction.

    Of course, the native way for storage to be shared between Unix and Linux computers is by using NFS, but that seems to confuse lots of people, since it makes remote storage appear like it is local storage with all the permissions we expect on a Unix computer. There are a few tricks to ensure this works well, as NFS doesn't care about usernames or groupnames. Rather, it cares about uid and gid - those numbers - so it is important to ensure any files that are shared have the correct uid/gid on all computers. There are setup by step NFS how-to guides for the client and server at help.ubuntu.com. This is a 1-time setup, then it "just works" for decades.

    NFS is a kernel module, so it performs slightly better than Samba, but samba isn't bad at performance either, if setup correctly. For media sharing, NFS is superior to samba.

    Anyway, that should be enough to get you access/sharing between Linux computers.

  3. #3
    Join Date
    Mar 2009
    Location
    Sacramento, CA
    Beans
    644
    Distro
    Xubuntu

    Re: Can't connect to SAMBA share

    Um. Yes, I have a line in fstab that automounts my second hard drive on my desktop. I hadn't added one to mount the drives on my desktop because it isn't always on (and besides I travel with the laptop sometimes) and anyway I don't need to access them from the laptop all that often. But when you need to it can be important.

    I tried installing samba wsdd avahi-daemon and it seemed to run successfully, but that hasn't made a difference that I can see.

    I wonder what I'm missing! I know I've been able to do this before; maybe 24.04 made a change in security settings that makes smb connections more difficult?
    Last edited by peyre; November 24th, 2024 at 05:33 PM.

  4. #4
    Join Date
    Mar 2010
    Location
    Been there, meh.
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Can't connect to SAMBA share

    There's a x-systemd.automount option for the fstab which won't mount storage until it is actually requested. I use this with my laptops. At home, it has access to 25TB of network storage (NFS), but when I'm away, accessing that storage never enters my mind, so it never gets accessed or even attempted.

  5. #5
    Join Date
    Dec 2009
    Beans
    6,816

    Re: Can't connect to SAMBA share

    from my Xubuntu 24.10 laptop, when I open Thunar and enter smb://%computername%, it asks what application I want to use to open it.
    Seems to be an evolutionary progression from what happened in 24.04.

    In 24.04 under Browse Network in thunar the subcategory of Windows Network was removed:

    It has always been labeled incorrectly since it implies SMB is only for windows.
    Windows Network is a NetBIOS browsing function. There is no "browsing' in a modern network ... since there is no NetBIOS .. since there is no SMBv1.

    smb://%computername% will initiate - or try to initiate - a browsing for that SMB host.

    Try to access the server this way which will bypass NetBIOS:
    Code:
    smb://computername.local
    Just make sure avahi-daemon is installed and running on both server and client.
    Last edited by Morbius1; November 24th, 2024 at 07:33 PM.

  6. #6
    Join Date
    Mar 2009
    Location
    Sacramento, CA
    Beans
    644
    Distro
    Xubuntu

    Re: Can't connect to SAMBA share

    smb://computername.local works on my desktop; I can see my shares there. But on the laptop it again asks what I want to use, and offers samba-tool, which does nothing.

    avahi-daemon is running.
    Last edited by peyre; November 24th, 2024 at 07:39 PM.

  7. #7
    Join Date
    Dec 2009
    Beans
    6,816

    Re: Can't connect to SAMBA share

    None of this will work unless you are in the same subnet. Are you sure both machines are connected to the same router?

    Can you - from the 24.10 machine - ping the server:
    Code:
    ping -c3 computername.local
    Or even by ip address:
    Code:
    ping -c3 server-ip-address
    And for the life of me I don't know how samba-tool is even an option on your desktop system/

  8. #8
    Join Date
    Mar 2009
    Location
    Sacramento, CA
    Beans
    644
    Distro
    Xubuntu

    Re: Can't connect to SAMBA share

    I'm at home, and only have one router. In fact I'm at my desk, with the laptop on my left, the computer on the right, and the router on the back of the desk. Laptop's on wifi.

    ping -c3 computername.local returns: Temporary failure in name resolution

    ping -c3 ipaddress returns pings. So does ping -c3 ipaddress.

    smb://ipaddress in Thunar still does the thing with samba-tool. I agree, I've never seen that before, don't know why it's there. Maybe something I installed in Synaptic.

  9. #9
    Join Date
    Dec 2009
    Beans
    6,816

    Re: Can't connect to SAMBA share

    I can't reproduce any of your symptoms in my live xubuntu 24.10 so ............

    Install smbclient on the client:
    Code:
    sudo apt install smbclient
    Then run the following command with the correct ip address of the server:
    Code:
    smbclient -L 192.168.1.103
    If the server requires a username pass that user name this way:
    Code:
    smbclient -L 192.168.1.103 -U username
    Do you get a listing of the server's shares?

  10. #10
    Join Date
    Mar 2009
    Location
    Sacramento, CA
    Beans
    644
    Distro
    Xubuntu

    Re: Can't connect to SAMBA share

    Ah, that's better! It challenges for a password.

    Code:
    Password for [WORKGROUP\leon]:
    
    	Sharename       Type      Comment
    	---------       ----      -------
    	HomeFolder      Disk      Home folder share
    	Storage         Disk      Storage share
    	print$          Disk      Printer Drivers
    	IPC$            IPC       IPC Service (%servername% server (Samba, Ubuntu))
    SMB1 disabled -- no workgroup available
    However, when I enter my password (I think the samba password is the same as my login one), it denies me, as above.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •