Samaba headache again

I finally got off my duff and installed 15.1 It went well except for a few minor glitches, Note I don’t upgrade I install fresh on a second partition I keep for the purpose. Once all is running I mount my home and I’m off. In any case I have a weird Samba problem. I use Samba as a simple pier to pier to a Win7 VM (VBox) and an very old Eee PC (XP) Now I can see all clients from the Win 7 and the XP connect browse and such but i see nothing from 15.1 not even itself. Seems like every time I upgrade I have to wrestle with Samba.

Her is the smb.conf file I use and has worked in the past


[global]
    workgroup = MSHOME
    passdb backend = tdbsam
    printing = cups
    printcap name = cups
    printcap cache time = 750
    cups options = raw
    map to guest = Bad User
    include = /etc/samba/dhcp.conf
    #logon path = \\%L\profiles\.msprofile
    #logon home = \\%L\%U\.9xprofile
    #logon drive = P:
    usershare allow guests = Yes
    name resolve order = bcast host lmhosts wins
    netbios name = Linux1
    local master = yes
    os level = 33
    wins support = No
    usershare max shares = 100
    client max protocol = SMB3
    wins server = 

[users]
    comment = All users
    path = /home
    read only = No
    guest ok = Yes
    inherit acls = Yes
    veto files = /aquota.user/groups/shares/

[gogalthorp]
    comment = Home sweet home
    path = /home/gogalthorp/
    read only = No
    guest ok = Yes
    force user = gogalthorp



I only understand about 1/2 this stuff

So the server appears to work but the client does not. I have restarted it several times. I think the firewall is set right but with the new zones defined I’m not sure. I may be missing something :stuck_out_tongue:

Hi
If you try and connect to the localhost with the smbclient and add some debug.


smbclient -d3 -L \\127.0.0.1

More than likely some samba protocol security issue…


gogalthorp@linux1:~> smbclient -d3 -L \\127.0.0.1
lp_load_ex: refreshing parameters
Initialising global parameters
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[global]"
Can't find include file /etc/samba/dhcp.conf
directory_create_or_exist_strict: invalid ownership on directory /var/lib/samba/lock/msg.lock
cmdline_messaging_context: Unable to initialize messaging context.
Unable to initialize messaging context
lp_load_ex: refreshing parameters
Initialising global parameters
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[global]"
Can't find include file /etc/samba/dhcp.conf
added interface eth0 ip=192.168.1.3 bcast=192.168.1.255 netmask=255.255.255.0
Client started (version 4.9.5-git.176.375e1f05788lp151.2.3.1-SUSE-oS15.0-x86_64).
Connecting to 127.0.0.1 at port 445
got OID=1.3.6.1.4.1.311.2.2.10
Enter MSHOME\gogalthorp's password: 
GENSEC backend 'gssapi_spnego' registered
GENSEC backend 'gssapi_krb5' registered
GENSEC backend 'gssapi_krb5_sasl' registered
GENSEC backend 'spnego' registered
GENSEC backend 'schannel' registered
GENSEC backend 'naclrpc_as_system' registered
GENSEC backend 'sasl-EXTERNAL' registered
GENSEC backend 'ntlmssp' registered
GENSEC backend 'ntlmssp_resume_ccache' registered
GENSEC backend 'http_basic' registered
GENSEC backend 'http_ntlm' registered
GENSEC backend 'http_negotiate' registered
Got challenge flags:
Got NTLMSSP neg_flags=0x628a8215
NTLMSSP: Set final flags:
Got NTLMSSP neg_flags=0x62088215
NTLMSSP Sign/Seal - Initialising with flags:
Got NTLMSSP neg_flags=0x62088215

        Sharename       Type      Comment
        ---------       ----      -------
        users           Disk      All users
        gogalthorp      Disk      Home sweet home
        IPC$            IPC       IPC Service (Samba 4.9.5-git.176.375e1f05788lp151.2.3.1-SUSE-oS15.0-x86_64)
Reconnecting with SMB1 for workgroup listing.
Connecting to 127.0.0.1 at port 139
got OID=1.3.6.1.4.1.311.2.2.10
Got challenge flags:
Got NTLMSSP neg_flags=0x628a8215
NTLMSSP: Set final flags:
Got NTLMSSP neg_flags=0x62088215
NTLMSSP Sign/Seal - Initialising with flags:
Got NTLMSSP neg_flags=0x62088215

        Server               Comment
        ---------            -------

        Workgroup            Master
        ---------            -------
        MSHOME               LINUX1



Hi
Well that looks all fine, so I guess it’s a desktop issue?

So, you can navigate to the shares ok, it’s just the discovery that’s missing? If so, that’s just due to SMBv1 disabled (deprecated and disabled for good security reasons).

BTW, smbtree still works because it temporarily uses SMBv1 for NetBIOS discovery. :wink:

I can navigate from the Windows instance to each other and the Linux Machine but can’t see the Windows machins or itself from the Linux.But one is XP thus maybe SMBv1?? But problem is there even if the XP is off

I can actually live with it like it is but it bothers me it does not work right LOL

Yes XP uses SMBv1, but form a security POV it should be disabled on all samba hosts as per the many advisories…
https://techcommunity.microsoft.com/t5/Storage-at-Microsoft/Stop-using-SMB1/ba-p/425858
https://blog.safe-t.com/whats-the-problem-with-smb-1-should-you-worry-about-smb-2-and-3

I can actually live with it like it is but it bothers me it does not work right LOL

I typically just add the required samba shares in my Dolphin ‘Places’ panel, then future navigation is convenient.

FWIW, I recently assisted in a similar thread…
https://forums.opensuse.org/showthread.php/536902-Show-all-Samba-shares-in-a-anetwork-in-Dolphin-(or-any-other-GUI)

For samba running on Linux hosts only, avahi can be employed for similar discovery…

From the Dolphin ‘Netwok’ > Network (press F5 to reload if necessary)

and this will show hosts on the LAN with their advertised services including samba shares if active.

Nothing at all shows on Dolphin - Network shows nothing at all not even local shares

What does avahi-browse report regarding your local machine?

avahi-browse -art

Hmmm avahi-browse not found also nothing provides it and not in search.

avahi package is installed, here are the files


/etc/avahi
/etc/avahi/avahi-daemon.conf
/etc/avahi/avahi-dnsconfd.action
/etc/avahi/hosts
/etc/avahi/services
/etc/avahi/services/sftp-ssh.service
/etc/avahi/services/ssh.service
/etc/dbus-1/system.d/avahi-dbus.conf
/etc/sysconfig/SuSEfirewall2.d/services/avahi
/etc/sysconfig/network/if-up.d/avahi-daemon
/run/avahi-daemon
/usr/lib/avahi
/usr/lib/avahi/avahi-daemon-check-dns.sh
/usr/lib/systemd/system/avahi-daemon.service
/usr/lib/systemd/system/avahi-daemon.socket
/usr/lib/systemd/system/avahi-dnsconfd.service
/usr/lib64/avahi
/usr/lib64/avahi/service-types.db
/usr/sbin/avahi-daemon
/usr/sbin/avahi-dnsconfd
/usr/sbin/rcavahi-daemon
/usr/sbin/rcavahi-dnsconfd
/usr/share/avahi
/usr/share/avahi/interfaces
/usr/share/avahi/interfaces/avahi-discover.ui
/usr/share/dbus-1/interfaces/org.freedesktop.Avahi.AddressResolver.xml
/usr/share/dbus-1/interfaces/org.freedesktop.Avahi.DomainBrowser.xml
/usr/share/dbus-1/interfaces/org.freedesktop.Avahi.EntryGroup.xml
/usr/share/dbus-1/interfaces/org.freedesktop.Avahi.HostNameResolver.xml
/usr/share/dbus-1/interfaces/org.freedesktop.Avahi.RecordBrowser.xml
/usr/share/dbus-1/interfaces/org.freedesktop.Avahi.Server.xml
/usr/share/dbus-1/interfaces/org.freedesktop.Avahi.ServiceBrowser.xml
/usr/share/dbus-1/interfaces/org.freedesktop.Avahi.ServiceResolver.xml
/usr/share/dbus-1/interfaces/org.freedesktop.Avahi.ServiceTypeBrowser.xml
/usr/share/dbus-1/system-services/org.freedesktop.Avahi.service
/usr/share/doc/packages/avahi
/usr/share/doc/packages/avahi/API-CHANGES-0.6
/usr/share/doc/packages/avahi/AUTHORS
/usr/share/doc/packages/avahi/COMPAT-LAYERS
/usr/share/doc/packages/avahi/DBUS-API
/usr/share/doc/packages/avahi/HACKING
/usr/share/doc/packages/avahi/INSTALL
/usr/share/doc/packages/avahi/MALLOC
/usr/share/doc/packages/avahi/NEWS
/usr/share/doc/packages/avahi/README
/usr/share/doc/packages/avahi/TODO
/usr/share/doc/packages/avahi/avahi-poll.dia
/usr/share/doc/packages/avahi/overview.dia
/usr/share/doc/packages/avahi/server-states.dia
/usr/share/fillup-templates/sysconfig.avahi
/usr/share/licenses/avahi
/usr/share/licenses/avahi/LICENSE
/usr/share/man/man5/avahi-daemon.conf.5.gz
/usr/share/man/man5/avahi.hosts.5.gz
/usr/share/man/man5/avahi.service.5.gz
/usr/share/man/man8/avahi-autoipd.action.8.gz
/usr/share/man/man8/avahi-daemon.8.gz
/usr/share/man/man8/avahi-dnsconfd.8.gz
/usr/share/man/man8/avahi-dnsconfd.action.8.gz

59 files total



It’s part of avahi-utils.

Further to my earlier comments about samba…

From ‘man smb.conf’…

If compiled with proper support for it, Samba will announce itself with multicast DNS services like for example provided by the Avahi daemon.
This parameter allows disabling Samba to register itself.
Default: *multicast dns register = yes *

Ok got it avahi-browse -art runs but returns an empty list

Status and configuration details would help here…

sudo systemctl status avahi-daemon
cat /etc/avahi/avahi-daemon.conf

You may need to restart the avahi-daemon service as well.

Looks like it is running


linux1:/etc/samba # systemctl status avahi-daemon
● avahi-daemon.service - Avahi mDNS/DNS-SD Stack
   Loaded: loaded (/usr/lib/systemd/system/avahi-daemon.service; enabled; vendor preset: enabled)
   Active: active (running)
 Main PID: 1055 (avahi-daemon)
   Status: "Server startup complete. Host name is linux1.local. Local service cookie is 369464222."
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/avahi-daemon.service
           └─1055 avahi-daemon: running [linux1.local]

Aug 11 11:52:56 linux1 avahi-daemon[1055]: Server startup complete. Host name is linux1.local. Local service cookie is 369464222.
Aug 11 11:52:56 linux1 avahi-daemon[1055]: Service "linux1" (/etc/avahi/services/ssh.service) successfully established.
Aug 11 11:52:56 linux1 avahi-daemon[1055]: Service "linux1" (/etc/avahi/services/sftp-ssh.service) successfully established.
Aug 11 11:52:56 linux1 systemd[1]: Started Avahi mDNS/DNS-SD Stack.
Aug 11 11:52:58 linux1 avahi-daemon[1055]: Joining mDNS multicast group on interface eth0.IPv4 with address 192.168.1.3.
Aug 11 11:52:58 linux1 avahi-daemon[1055]: New relevant interface eth0.IPv4 for mDNS.
Aug 11 11:52:58 linux1 avahi-daemon[1055]: Registering new address record for 192.168.1.3 on eth0.IPv4.
Aug 11 11:53:00 linux1.localdomain avahi-daemon[1055]: Joining mDNS multicast group on interface eth0.IPv6 with address fe80::f2a3:>
Aug 11 11:53:00 linux1.localdomain avahi-daemon[1055]: New relevant interface eth0.IPv6 for mDNS.
Aug 11 11:53:00 linux1.localdomain avahi-daemon[1055]: Registering new address record for fe80::f2a3:9cf7:561a:4aba on eth0.*.





linux1:/etc/samba # cat /etc/avahi/avahi-daemon.conf
# This file is part of avahi.
#
# avahi is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# avahi is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
# License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with avahi; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA.

# See avahi-daemon.conf(5) for more information on this configuration
# file!

[server]
#host-name=foo
#domain-name=local
#browse-domains=0pointer.de, zeroconf.org
use-ipv4=yes
use-ipv6=yes
#allow-interfaces=eth0
#deny-interfaces=eth1
#check-response-ttl=no
#use-iff-running=no
#enable-dbus=yes
#disallow-other-stacks=no
#allow-point-to-point=no
#cache-entries-max=4096
#clients-max=4096
#objects-per-client-max=1024
#entries-per-entry-group-max=32
ratelimit-interval-usec=1000000
ratelimit-burst=1000

[wide-area]
enable-wide-area=yes

[publish]
#disable-publishing=no
#disable-user-service-publishing=no
#add-service-cookie=no
#publish-addresses=yes
publish-hinfo=no
publish-workstation=no
#publish-domain=yes
#publish-dns-servers=192.168.50.1, 192.168.50.2
#publish-resolv-conf-dns-servers=yes
#publish-aaaa-on-ipv4=yes
#publish-a-on-ipv6=no

[reflector]
#enable-reflector=no
#reflect-ipv=no

[rlimits]
#rlimit-as=
#rlimit-core=0
#rlimit-data=8388608
#rlimit-fsize=0
#rlimit-nofile=768
#rlimit-stack=8388608
#rlimit-nproc=3



A lot is remarked out Should some of this stuff be turned on??

That looks as it should. No additional configuration needed (as defaults are ok and services should be published). If samba is running then you should see the samba service advertised.

For reference, my local services are reported like this

=   eth0 IPv6 linux-4k1z                                    SSH Remote Terminal  local
   hostname = [linux-4k1z.local]
   address = [fe80::a00:27ff:fe74:e4b1]
   port = [22]
   txt = ]
=   eth0 IPv4 linux-4k1z                                    SSH Remote Terminal  local
   hostname = [linux-4k1z.local]
   address = [192.168.30.238]
   port = [22]
   txt = ]
=   eth0 IPv6 linux-4k1z                                    SFTP File Transfer   local
   hostname = [linux-4k1z.local]
   address = [fe80::a00:27ff:fe74:e4b1]
   port = [22]
   txt = ]
=   eth0 IPv4 linux-4k1z                                    SFTP File Transfer   local
   hostname = [linux-4k1z.local]
   address = [192.168.30.238]
   port = [22]
   txt = ]
=   eth0 IPv6 LINUX-4K1Z                                    Microsoft Windows Network local
   hostname = [linux-4k1z.local]
   address = [fe80::a00:27ff:fe74:e4b1]
   port = [445]
   txt = ]
=   eth0 IPv4 LINUX-4K1Z                                    Microsoft Windows Network local
   hostname = [linux-4k1z.local]
   address = [192.168.30.238]
   port = [445]
   txt = ]
=   eth0 IPv6 LINUX-4K1Z                                    _device-info._tcp    local
   hostname = [linux-4k1z.local]
   address = [fe80::a00:27ff:fe74:e4b1]
   port = [0]
   txt = "model=MacSamba"]
=   eth0 IPv4 LINUX-4K1Z                                    _device-info._tcp    local
   hostname = [linux-4k1z.local]
   address = [192.168.30.238]
   port = [0]
   txt = "model=MacSamba"]

Sudden thought - make sure your firewall is allowing mdns traffic.

firewall-cmd --list-all

No mdns was not in default. I added it but no go. note that default is public right??? I set public up as I thought it should be with my past experience. But maybe that is wrong. Exactly which zones should be used and what are the new settings in general for samba simple pier to pier on local net only. Things were simpler when there were only 3 zones defined

Firewall list now


linux1:/home/gogalthorp # firewall-cmd --list-all
public (active)
  target: default
  icmp-block-inversion: no
  interfaces: eth0
  sources: 
  services: dhcpv6-client samba samba-client mdns
  ports: 
  protocols: 
  masquerade: no
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules: