Page 1 of 1

Can't connect to Samba shares

Posted: Mon Sep 20, 2021 10:44 pm
by dev_willis
I've installed the Samab server and configured a couple shares. This was working but then I set about trying to configure mDNS. Now I've got mDNS working but I can no longer connect to my Samab shares from either Windows or Mac. Mac says `No such file or directory` and Windows says `Network name cannot be found.`

However, I can successfully ping the host from both Windows and Mac and Powershell's `Test-NetConnection` succeeds on both port 139 and 445.

What am I missing?

Here's my smb.conf:

Code: Select all

[global]

        workgroup = WORKGROUP
        server string = %h server
        dns proxy = no
        log file = /var/log/samba/log.%m
        max log size = 1000
        syslog only = no
        syslog = 0

        panic action = /usr/share/samba/panic-action %d

        security = user
        encrypt passwords = true
        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

        load printers = no
        printcap name = /dev/null
        disable spoolss = yes

        min protocol = SMB2
        vfs objects = fruit streams_xattr
        fruit:metadata = stream
        fruit:model = MacSamba
        fruit:posix_rename = yes
        fruit:veto_appledouble = no
        fruit:wipe_intentionally_left_blank_rfork = yes
        fruit:delete_empty_adfiles = yes

[dietpi]
        comment = PiNAS
        path = /mnt/dietpi_userdata
        browseable = yes
        writeable = yes
        create mask = 0664
        directory mask = 0775
        valid users = dietpi
        max connections = 8
[history]
        comment = File history drive
        path = /mnt/history
        browsable = yes
        writeable = yes
        read only = no
        guest ok = no
        create mask = 0664
        directory mask = 0775
        valid users = smbuser
        max connections = 8
        fruit:time machine = yes
[backups]
        comment = Backup drive
        path = /mnt/backups
        browsable = yes
        writeable = yes
        read only = no
        guest ok = no
        create mask = 0664
        directory mask = 0775
        valid users = smbuser
        max connections = 8
Thanks!

Re: Can't connect to Samba shares

Posted: Mon Sep 20, 2021 11:32 pm
by Joulinar
Hi,

I did a test with your settings, and it seems following line is preventing to connect to samba

Code: Select all

vfs objects = fruit streams_xattr
as soon as I hashed the line, I could connect and got all 3 shared displayed.

Re: Can't connect to Samba shares

Posted: Tue Sep 21, 2021 3:05 pm
by dev_willis
Thank you! That did indeed get the shares working again. As it turns out, the share can't be used as a Time Machine target without that line. What I wound up needing to do was apt install samba-vfs-modules. After that, I was able to uncomment the line and both Windows and Mac can connect and use the share.

Re: Can't connect to Samba shares

Posted: Tue Sep 21, 2021 3:19 pm
by Joulinar
thx for sharing, I will mark your reply as solution.