Samba problem - no workgroup available

I can reach the workstations using smbclient -L and IP adresses, but smbtree does not give any output, and dolphin does not see the workstations (Win 10).

dagr@opensuse:~> smbclient -L 192.168.0.123
Enter WORKGROUP-RA319\dagr's password: 

        Sharename       Type      Comment
        ---------       ----      -------
        ADMIN$          Disk      Ekstern administrasjon
        C$              Disk      Delt standardressurs
        IPC$            IPC       Ekstern IPC
        Music           Disk      
        Videos          Disk      
SMB1 disabled -- no workgroup available


After reading posts on the forum I have read about the /etc/hosts file. I have put in the IP adress of my opensuse server, but I’m not sure if I have done it right:

# IP-Address  Full-Qualified-Hostname  Short-Hostname
#

127.0.0.1       localhost
192.168.0.106   opensuse
# special IPv6 addresses
::1             localhost ipv6-localhost ipv6-loopback

fe00::0         ipv6-localnet

ff00::0         ipv6-mcastprefix
ff02::1         ipv6-allnodes
ff02::2         ipv6-allrouters
ff02::3         ipv6-allhosts



I get the message above, and wonder if someone can give me a hint about my setup which makes this go wrong.

Dag R

See if these recent threads help…
https://forums.opensuse.org/showthread.php/543049-SAMBA-and-host-names-in-local-network?highlight=ws-discovery
https://forums.opensuse.org/showthread.php/543118-Seeking-tutorial-to-set-up-home-network-SAMBA-file-sharing-between-2-Linux-machines?highlight=ws-discovery+deano_ferrari

BTW, are all your samba hosts SMB2+ capable?

SMBv1 appears to be properly disabled.

Your /etc/hosts file entry only describes the machine hostname “opensuse”
Depending on your client connection string, the entry you created might be sufficient to successfully connect but would not likely fix the error you’re seeing.
The Workgroup name is in addition to the hostname, eg opensuse.workgroup where “workgroup” would be whatever your workgroup ;name is.

If you don’t know what your workgroup name should be, perhaps a good place to start would be whatever your SAMbA server is already configured with and so would require.

Inspect your smb.conf and if necessary post for others to view… Offhand, I con’t think there is anything unique or sensitive others shouldn’t see it. Your smb.conf will likely identify your workgroup as a DOMAIN.

TSU

BTW -
I’d direct your attention to the “Sticky post” at the top of this Forum which describes specifically configuring the Workgroup.

TSU

Here is my /etc/samba/smb.conf:

[global]
    workgroup = WORKGROUP-RA319
    netbios name = opensuse
    server string = media og backup
    name resolve order = bcast host lmhosts wins
    local master = yes
    preferred master = yes
    os level = 64
    passdb backend = tdbsam
    printing = cups
    printcap name = cups
    printcap cache time = 750
    cups options = raw
    map to guest = Bad User
    usershare allow guests = Yes
    usershare max shares = 100
    wins support = Yes
    ldap admin dn = 

; client max protocol = NT1
[homes]
    comment = Home Directories
    valid users = %S, %D%w%S
    browseable = Yes
    read only = No
    inherit acls = Yes
    guest ok = Yes
[profiles]
    comment = Network Profiles Service
    path = %H
    read only = No
    store dos attributes = Yes
    create mask = 0600
    directory mask = 0700

[users]
    comment = All users
    path = /home
    read only = No
    inherit acls = Yes
    veto files = /aquota.user/groups/shares/
    guest ok = Yes
[groups]
    comment = All groups
    path = /home/groups
    read only = No
    inherit acls = Yes
[printers]
    comment = All Printers
    path = /var/tmp
    printable = Yes
    create mask = 0600
    browseable = No
[print$]
    comment = Printer Drivers
    path = /var/lib/samba/drivers
    write list = @ntadmin root
    force group = ntadmin
    create mask = 0664
    directory mask = 0775

[Nedlastinger]
    comment = film, media
    inherit acls = Yes
    path = /home/dagr/Nedlastinger
    read only = No
    guest ok = Yes


Here is the output from the windows machine:

PS C:\WINDOWS\system32> Get-SmbServerConfiguration | Select EnableSMB2Protocol

EnableSMB2Protocol
------------------
              True

Ok, that looks as expected. You mentioned that “Dolphin does not see the workstations (Win 10).” That is expected (now that NetBIOS discovery is deprecated and disabled). However, if using Dolpin 20.04.0+, the newer WS-Discovery protocol can be used, assuming the requisite discovery services are turned on in Windows of course…

If not already doing so, you’d need to upgrade using the KDE repos as I already outlined…
https://forums.opensuse.org/showthread.php/543049-SAMBA-and-host-names-in-local-network?p=2955301#post2955301

Some suggestions although I don’t think should affect your current problem…

Change or shorten your WORKGROUP name,
Although the current hame is supportd by hostname resolution (aka using DNS, /etc/hosts), it’s unusable by any systems that try to convert or read it as a NetBIOS name which has a limit of 8 characters without spaces and special characters.
Remove lmhosts and winds, that’s the NetBIOS name resolution system which would be screwed up by your current WORKGROUP name and shouldn’t be used nowadays. It’s a relic of the old MSWindows NT4 architecture no one should be using anymore without good reason.

Restart, or better yet just reboot your system after making the above changes and test. Maybe that’ll fix the WORKGROUP error although it’ll still make a diff how you create your connection string.

Are you using YaST to set up your server and clients or are you handcrafting connections?
Auto discovery is nice, but you wouldn’t need that if you simply use a valid connection string.

BTW - After you fix your workgroup name, you can set up both the FQDN and simple name entries in your /etc/hosts file.
And your connection string might be something like the following (adjust as necessary)

smb://opensuse.WORKGROUP-RA319/Nedlastinger

TSU

The concept of a workgroup environment is history now that SMBv1 (NT1) protocol has been deprecated. As long as the requisite shares and authentication mechanisms are in place on the Windows servers, there should be no problem accessing these from a Linux host supporting SMBv2+.

Not correct - it is 15 characters. In any case not relevant when NetBIOS is no longer in use.

You’re right.
Now I’ve been thinking where I got that 8 character limit from…
Am guessing that it had to do with “shortened” NetBIOS names that complied with the 8.3 format.
In other words, although you could create a name over 8 characters in length, there were plenty of tools and systems that shortened the name and displayed only the first 8 characters, and any remaining would be hidden.

Take for instance the @OP’s workgroup name…
WORKGROUP-RA319.

In a shortened name environment, you’d run into 2 problems

  1. You’d think that the full workgroup name is the following and you’d be incorrect.
    WORKGROU
  2. If you were also managing another workgroup with a different suffix, they’d both look the same and you wouldn’t be able to tell them apart.

So although the technical limit is 15 characters, the practical limit to avoid problems is 8 characters.

As for NetBIOS no longer in use,
I wish that were the case but there’s still a number of people out there running SAMBA 3 or running old apps that use NetBEUI or NetBIOS names because that was the standard when the app was built.

TSU

Let’s stay on topic. For openSUSE Leap 15.2 using samba 4.11.x, it is disabled by default now.

Ok,  that looks as expected. You mentioned that "Dolphin does not see the  workstations (Win 10)." That is expected (now that NetBIOS discovery is  deprecated and disabled). However, if using Dolpin 20.04.0+, the newer  WS-Discovery protocol can be used, assuming the requisite discovery  services are turned on in Windows of course...
https://fitzcarraldoblog.wordpress.c...nux-computers/

If not already doing so, you'd need to upgrade using the KDE repos as I already outlined...
https://forums.opensuse.org/showthre...01#post2955301

It seems this did the trick. The win machines pops up in dolphin. Smbtree does not give any output, but maybe this is how it is with this version of Samba? I have some loose ends. I have turned off firewalld and have not done any editing of the wsdd2 conf files.

Dag R

Glad to have been of guidance.

Smbtree does not give any output, but maybe this is how it is with this version of Samba?

It was built for legacy samba networks where SMBv1 (NT1 protocol) is in use, so won’t return any “Network Neighbourhood” output in your SMB2/SMB3 samba/Windows environment. You can target a particular host with smbclient though…

smbclient -L //<IP address>

An example…

~> smbclient -L //deanm.local
Enter WORKGROUP\dean's password: 

        Sharename       Type      Comment
        ---------       ----      -------
        ADMIN$          Disk      Remote Admin
        C$              Disk      Default share
        Documents       Disk      
        Downloads       Disk      
        IPC$            IPC       Remote IPC
        Public          Disk      
        Share           Disk      
        Users           Disk      
SMB1 disabled -- no workgroup available

I have some loose ends. I have turned off firewalld and have not done any editing of the wsdd2 conf files.

Dag R

Can you clarify further here? If you want to allow WS-Discovery with an active firewall, then add the ‘ws-discovery’ service.

More info…

man wsdd2

Concerning the Dolphin and plasma repositories, here is the output of the version number:

dagr@opensuse:~> plasmashell -v
plasmashell 5.18.5
dagr@opensuse:~> dolphin -v
dolphin 20.04.2


This is the same versions you recommended? I run Opensuse 15.2 .

Dag R

Correct…
Operating System: openSUSE Leap 15.2
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.71.0
Qt Version: 5.12.7
Dolphin 20.04.2

Ok. Fixed the firewalld thing. I have a last question in this conversation. I get to instances of my suse server in Dolphin (besides the windows machines). One is written i capital letters and one in small letters. It seems to be something which I have set up twice.

Had been nice to know how to fix this.

Dag R

Are you referring to Dolphin Places panel > Network > Network ? That will show Linux host services providing sftp, ssh, and smb services IIRC. For example, I see a folder with lowercase hostname representing sftp service, and a folder with same uppercase hostname representing samba service.

If you navigate to Dolphin Places panel > Network > Shared Folders (Samba) that should just report samba/Windows hosts (detected via Avahi and WS-Discovery methods).

After more digging, I did find this KDE bug report…
https://bugs.kde.org/show_bug.cgi?id=422001

It describes how Avahi and WS-Discovery can cause duplicate entries for (Linux) hosts where wsdd/wsdd2 is in active. From my POV, it’s not really a problem worth being concerned about though. Perhaps this is what you’re observing?