File share problem to Windows 11

Hello everyone,

I’m having a problem connecting to shares created in Windows 11 under Slowroll.
The strange thing is that it works just fine with my NAS. I can also connect to shares created in VirtualBox for Leap 15.6 in Windows 11.
I’ve been searching for days to figure out why, and I’ve tried everything.
I keep getting error: 0x80070043 “cannot find the network name” in Windows.
I’m very curious if there are other problems with this.
I had the same problem before in Leap 16, by the way!
Thanks in advance for your reply,

Gerrit Jan

When I first read this, I assumed that the Slowroll was the client (trying to access a Windows share) in this situation, but then you mentioned…

So you’re trying to access a share on the Slowroll host from your windows PC? Can you reach it by IP address ok?

sorry, "So you’re trying to access a share on the Slowroll host from your windows PC? Can you reach it by IP address ok?" Yes
From windows i can ping slowroll.

Ok, so Windows 11 machine is the client, and Slowroll is hosting the Samba share.

The connection by IP works, but by hostname it fails with 0x80070043. How are you trying to do name resolution?

To reach a Linux host, you could make use of mDNS. From the Slowroll box, run

hostname

and use this in Windows in the form “hostname.local” .

For example, if the Avahi hostname is “slowroll.local”, then in Windows File Explorer, try:

\\slowroll.local\share

In order for this to work though, you need to ensure that “mdns” is allowed in the openSUSE firewall. Let me know if you need help with that.

If you prefer, you can also enable NetBIOS (WINS-style) name resolution instead:

sudo systemctl enable --now nmb

That will allow Windows to resolve \\slowroll the old NetBIOS way.

It works!
But I created some extra shares via the YAST samba server, and Windows doesn’t see them?
And the strange thing is that they’re not visible, but a few older shares are? I don’t understand that.
I hope you can help me with that.
Thanks a lot, Gerrit Jan.

Oh yeah, why doesn’t the normal method work anymore? Is it a bug in Samba?

I would first look at differences in access rights between the shares/folders that work and those who don’t.

I’m not quite sure what you mean here. Can you access the shares directly, by typing their full paths in Windows Explorer? Please note that the shares aren’t advertised as such, just the samba host these days (with SMB2/SMB3).

What normal method? I think you may be getting confused with the long-deprecated SMB1/NetBIOS protocol, where NetBIOS broadcasts advertised the shares on a LAN.

Okay, I’ve deleted all the shares via yast samba-server. And restarted samba.
But in Windows, I still see three shares.
I don’t understand this at all.
Where are those shares?

Likely what is defined in smb.conf. Show the results from smbclient -L localhost -Non the Linux host.

localhost:~ # smbclient -L localhost -N

        Sharename       Type      Comment
        ---------       ----      -------
        profiles        Disk      Network Profiles Service
        users           Disk      All users
        groups          Disk      All groups
        print$          Disk      Printer Drivers
        IPC$            IPC       IPC Service (Samba 4.22.3-git.403.4e078bdb832SUSE-oS16.9-x86_64)
        nobody          Disk      Home Directories
SMB1 disabled -- no workgroup available

Running testparm might be more useful.

localhost:~ # testparm
Load smb config files from /etc/samba/smb.conf
Loaded services file OK.
Weak crypto is allowed by GnuTLS (e.g. NTLM as a compatibility fallback)

Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions

# Global parameters
[global]
        logon drive = P:
        logon home = \\%L\%U\.9xprofile
        logon path = \\%L\profiles\.msprofile
        map to guest = Bad User
        printcap name = cups
        registry shares = Yes
        usershare allow guests = Yes
        usershare max shares = 100
        idmap config * : backend = tdb
        cups options = raw
        smb3 unix extensions = Yes


[homes]
        browseable = No
        comment = Home Directories
        inherit acls = Yes
        read only = No
        valid users = %S %D%w%S


[profiles]
        comment = Network Profiles Service
        create mask = 0600
        directory mask = 0700
        path = %H
        read only = No


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


[groups]
        comment = All groups
        inherit acls = Yes
        path = /home/groups
        read only = No


[printers]
        browseable = No
        comment = All Printers
        create mask = 0600
        path = /var/tmp
        printable = Yes


[print$]
        comment = Printer Drivers
        create mask = 0664
        directory mask = 0775
        force group = ntadmin
        path = /var/lib/samba/drivers
        write list = @ntadmin root

This is a copy off smb.config

# smb.conf is the main Samba configuration file. see man smb.conf 
# for full details.
[global]
	workgroup = WORKGROUP
	passdb backend = tdbsam
	printing = cups
	printcap name = cups
	printcap cache time = 750
	cups options = raw
	map to guest = Bad User
	logon path = \\%L\profiles\.msprofile
	logon home = \\%L\%U\.9xprofile
	logon drive = P:
	usershare allow guests = Yes
	smb3 unix extensions = Yes
	include = registry
	usershare max shares = 100
	wins support = No
	wins server = 
[homes]
	comment = Home Directories
	valid users = %S, %D%w%S
	browseable = No
	read only = No
	inherit acls = 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/
[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

You don’t have any samba usershares in existence? (Defined in the /var/lib/samba/usershares/ directory.)

No empty…
Itś so strange

Sorry, sorry, I’m an idiot :slight_smile:
I searched for only localhost and, of course, only got the shares on Windows.
So stupid… I’m ashamed.

What user name and password do you enter for slowroll.localhost for referenties when I search for network connection on Windows?

I’m a bit lost.
Taking a break, I’ll continue tomorrow.
Thanks!

All good. We all make mistakes.

It depends on how you shared the folder. Select “Everyone” to give all network users access to the files in a folder being shared. Then, when accessing the Windows share from a Linux host, you can then enter any username/password in when prompted.

I found something.
I changed the avahi home name to slowroll and was then able to access Linux from Windows.
But the created shares don’t work, but the default ones do.

When I look in /var/lib/samba/usershares/ , it’s completely empty.
So something is clearly wrong with creating shares.
It seems like a bug in Samba.
I’ve reinstalled Samba a few times to see if that fixes anything.

I’m leaving it alone for now and am curious if a fix is ​​forthcoming.
Especially since I’ve never had any problems in Leap 15.6 before, with an older Samba version.

Thanks everyone for your input.
Gerrit Jan

You didn’t need to change the Avahi name as such. The name is derived from the Linux hostname. Any shares that you add via the YaST Samba Share utility should be saved in /etc/samba/smb.conf.

No that won’t lead to a resolution.