Unable to mount samba share that originates from Rocky

EDIT: changing uid=1001 to uid=1000 fixed it, ugh

I tried to copy and paste my reddit post here, apparently as a new user I can’t post more than 2 links, here’s the link to all the others outputs.
I just tried to follow this guide and this guide, and my own previous knowledge for creating a samba share, but at this point I can’t get it to mount on arch.

When I try to mount this is my error. Here’s the output of lsof for the arch directory, and rocky directory.

Here’s my samba config file, and here’s what happens when I run sudo testparm. Here’s my groups and ids if you want that. Idk what else I’d give you to help out.

I also just found some good output from dmesg on my client(arch), doesn’t help me though…

To make things easier for anyone wanting to reply.:

The howtos:

And instead of pasting console output to pastebin, format it properly here, like below:

Error on mounting:

sudo mount -t cifs -o uid=1001,credentials=/home/mounts/Nextcloud/users/me/.smbcredentials,domain=leviathan,file_mode=0777,dir_mode=0777 //192.168.50.112/Highwind /home/mounts/Highwind
[sudo] password for me: 
mount error(16): Device or resource busy
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)

lsof:

sudo lsof | grep /home/mounts/Highwind & sudo lsof | wc -l
[1] 33808
lsof: WARNING: can't stat() lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
      Output information may be incomplete.
fuse.gvfsd-fuse file system /run/user/1000/gvfs
      Output information may be incomplete.
376610

lsof:

sudo lsof | grep /newRaid/Highwind
[sudo] password for me: 
[me@leviathan ~]$ sudo lsof | wc -l
4855

samba config:

sudo cat /etc/samba/smb.conf
# See smb.conf.example for a more detailed config file or
# read the smb.conf manpage.
# Run 'testparm' to verify the config is correct after
# you modified it.
 
[Home_Network]
        path = /newRaid/samba/Home_Network
        valid users = @friends
        browsable = yes
        writable = yes
        guest ok = no
        read only = no
 
[Highwind]
        path = /newRaid/samba/Highwind
        valid users = @friends
        browsable = yes
        writable = yes
        guest ok = no
        read only = no
 
[Scipio]
        path = /newRaid/samba/Scipio
        valid users = @me
        browsable = yes
        writable = yes
        guest ok = no
        read only = no

another samba config, although not sure which one the OP is really using.

Load smb config files from /etc/samba/smb.conf
Loaded services file OK.
Weak crypto is allowed
 
Server role: ROLE_STANDALONE
 
Press enter to see a dump of your service definitions
 
# Global parameters
[global]
        idmap config * : backend = tdb
 
 
[Home_Network]
        path = /newRaid/samba/Home_Network
        read only = No
        valid users = @friends
 
 
[Highwind]
        path = /newRaid/samba/Highwind
        read only = No
        valid users = @friends
 
 
[Scipio]
        path = /newRaid/samba/Scipio
        read only = No
        valid users = @me

user and group ids:

[ankel@leviathan ~]$ id
uid=1000(ankel) gid=1000(ankel) groups=1000(ankel),10(wheel),1004(friends),1005(guests),1006(me)
[ankel@leviathan ~]$ groups
ankel wheel friends guests me

dmesg output:

[38553.047453] CIFS: Attempting to mount \\192.168.50.112\Highwind
[38559.181472] CIFS: VFS: Error connecting to socket. Aborting operation.
[38559.181489] CIFS: VFS: cifs_mount failed w/return code = -113
[38569.405459] CIFS: Attempting to mount \\192.168.50.112\Home_Network
[38575.565512] CIFS: VFS: Error connecting to socket. Aborting operation.
[38575.565531] CIFS: VFS: cifs_mount failed w/return code = -113
[38575.575489] CIFS: Attempting to mount \\192.168.50.112\Highwind
[38576.590737] CIFS: VFS: Error connecting to socket. Aborting operation.
[38576.590754] CIFS: VFS: cifs_mount failed w/return code = -111
[38586.666036] CIFS: Attempting to mount \\192.168.50.112\Home_Network
[38587.237966] CIFS: Attempting to mount \\192.168.50.112\Highwind
[38694.310237] CIFS: Attempting to mount \\192.168.50.112\Home_Network
[38715.695648] CIFS: Attempting to mount \\192.168.50.112\Highwind
[40075.061534] CIFS: Attempting to mount \\192.168.50.112\Highwind
[48070.483456] CIFS: Attempting to mount \\192.168.50.112\Highwind

@jamess7995 I suggest you check your firewall configuration, looks to me that the ports are blocked. So, on your Rocky server where samba is, do this:

systemctl stop firewalld

then try to mount again. If it works, then you need to allow ports through the firewall.

EDIT: changing uid=1001 to uid=1000 fixed it, ugh

Thank you for fixing that and I forgot about codeblocks obviously. There’s actually not 2 samba configs, the one that is shorter is the output of testparm

Load smb config files from /etc/samba/smb.conf
Loaded services file OK.
Weak crypto is allowed
 
Server role: ROLE_STANDALONE
 
Press enter to see a dump of your service definitions
 
# Global parameters
[global]
        idmap config * : backend = tdb
 
 
[Home_Network]
        path = /newRaid/samba/Home_Network
        read only = No
        valid users = @friends
 
 
[Highwind]
        path = /newRaid/samba/Highwind
        read only = No
        valid users = @friends
 
 
[Scipio]
        path = /newRaid/samba/Scipio
        read only = No
        valid users = @me

This is the conf file

# See smb.conf.example for a more detailed config file or
# read the smb.conf manpage.
# Run 'testparm' to verify the config is correct after
# you modified it.

[Home_Network]
        path = /newRaid/samba/Home_Network
        valid users = @friends
        browsable = yes
        writable = yes
        guest ok = no
        read only = no

[Highwind]
        path = /newRaid/samba/Highwind
        valid users = @friends
        browsable = yes
        writable = yes
        guest ok = no
        read only = no

[Scipio]
        path = /newRaid/samba/Scipio
        valid users = @me
        browsable = yes
        writable = yes
        guest ok = no
        read only = no

I tried the firewall suggestion, no change in behavior but here’s dmesg anyway

[38401.404425] CIFS: Attempting to mount \\192.168.50.112\Home_Network
[38401.474883] CIFS: VFS:  BAD_NETWORK_NAME: \\192.168.50.112\Home_Network
[38401.478541] CIFS: VFS: cifs_mount failed w/return code = -2
[38401.488884] CIFS: Attempting to mount \\192.168.50.112\Highwind
[38401.537322] CIFS: VFS:  BAD_NETWORK_NAME: \\192.168.50.112\Highwind
[38401.540250] CIFS: VFS: cifs_mount failed w/return code = -2
[38411.647977] CIFS: Attempting to mount \\192.168.50.112\Home_Network
[38411.684354] CIFS: VFS:  BAD_NETWORK_NAME: \\192.168.50.112\Home_Network
[38411.686205] CIFS: VFS: cifs_mount failed w/return code = -2
[38411.688994] CIFS: Attempting to mount \\192.168.50.112\Highwind
[38411.721708] CIFS: VFS:  BAD_NETWORK_NAME: \\192.168.50.112\Highwind
[38411.723322] CIFS: VFS: cifs_mount failed w/return code = -2
[38421.901686] CIFS: Attempting to mount \\192.168.50.112\Home_Network
[38421.940131] CIFS: VFS:  BAD_NETWORK_NAME: \\192.168.50.112\Home_Network
[38421.941864] CIFS: VFS: cifs_mount failed w/return code = -2
[38421.948054] CIFS: Attempting to mount \\192.168.50.112\Highwind
[38421.982683] CIFS: VFS:  BAD_NETWORK_NAME: \\192.168.50.112\Highwind
[38421.984473] CIFS: VFS: cifs_mount failed w/return code = -2
[38432.151610] CIFS: Attempting to mount \\192.168.50.112\Home_Network
[38432.191177] CIFS: VFS:  BAD_NETWORK_NAME: \\192.168.50.112\Home_Network
[38432.192838] CIFS: VFS: cifs_mount failed w/return code = -2
[38432.199019] CIFS: Attempting to mount \\192.168.50.112\Highwind
[38432.232788] CIFS: VFS:  BAD_NETWORK_NAME: \\192.168.50.112\Highwind
[38432.234406] CIFS: VFS: cifs_mount failed w/return code = -2
[38439.545687] CIFS: Attempting to mount \\192.168.50.112\Home_Network
[38439.580807] CIFS: VFS:  BAD_NETWORK_NAME: \\192.168.50.112\Home_Network
[38439.582400] CIFS: VFS: cifs_mount failed w/return code = -2
[38442.401533] CIFS: Attempting to mount \\192.168.50.112\Home_Network
[38442.435485] CIFS: VFS:  BAD_NETWORK_NAME: \\192.168.50.112\Home_Network
[38442.437100] CIFS: VFS: cifs_mount failed w/return code = -2
[38442.441757] CIFS: Attempting to mount \\192.168.50.112\Highwind
[38442.476107] CIFS: VFS:  BAD_NETWORK_NAME: \\192.168.50.112\Highwind
[38442.477651] CIFS: VFS: cifs_mount failed w/return code = -2
[38452.651149] CIFS: Attempting to mount \\192.168.50.112\Home_Network
[38452.684988] CIFS: VFS:  BAD_NETWORK_NAME: \\192.168.50.112\Home_Network
[38452.686825] CIFS: VFS: cifs_mount failed w/return code = -2
[38452.691257] CIFS: Attempting to mount \\192.168.50.112\Highwind
[38452.725518] CIFS: VFS:  BAD_NETWORK_NAME: \\192.168.50.112\Highwind
[38452.727252] CIFS: VFS: cifs_mount failed w/return code = -2
[38462.904324] CIFS: Attempting to mount \\192.168.50.112\Home_Network
[38462.939271] CIFS: VFS:  BAD_NETWORK_NAME: \\192.168.50.112\Home_Network
[38462.940955] CIFS: VFS: cifs_mount failed w/return code = -2
[38462.945846] CIFS: Attempting to mount \\192.168.50.112\Highwind
[38462.979404] CIFS: VFS:  BAD_NETWORK_NAME: \\192.168.50.112\Highwind
[38462.980782] CIFS: VFS: cifs_mount failed w/return code = -2
[38473.151488] CIFS: Attempting to mount \\192.168.50.112\Home_Network
[38473.152785] CIFS: VFS: Error connecting to socket. Aborting operation.
[38473.152789] CIFS: VFS: cifs_mount failed w/return code = -111
[38473.155035] CIFS: Attempting to mount \\192.168.50.112\Highwind
[38473.155854] CIFS: VFS: Error connecting to socket. Aborting operation.
[38473.155858] CIFS: VFS: cifs_mount failed w/return code = -111
[38483.401531] CIFS: Attempting to mount \\192.168.50.112\Home_Network
[38483.402808] CIFS: VFS: Error connecting to socket. Aborting operation.
[38483.402811] CIFS: VFS: cifs_mount failed w/return code = -111
[38483.405143] CIFS: Attempting to mount \\192.168.50.112\Highwind
[38483.405842] CIFS: VFS: Error connecting to socket. Aborting operation.
[38483.405845] CIFS: VFS: cifs_mount failed w/return code = -111
[38493.666328] CIFS: Attempting to mount \\192.168.50.112\Home_Network
[38493.667019] CIFS: VFS: Error connecting to socket. Aborting operation.
[38493.667033] CIFS: VFS: cifs_mount failed w/return code = -111
[38493.677690] CIFS: Attempting to mount \\192.168.50.112\Highwind
[38493.678610] CIFS: VFS: Error connecting to socket. Aborting operation.
[38493.678622] CIFS: VFS: cifs_mount failed w/return code = -111
[38503.916897] CIFS: Attempting to mount \\192.168.50.112\Home_Network
[38503.917768] CIFS: VFS: Error connecting to socket. Aborting operation.
[38503.917784] CIFS: VFS: cifs_mount failed w/return code = -111
[38503.928123] CIFS: Attempting to mount \\192.168.50.112\Highwind
[38503.929135] CIFS: VFS: Error connecting to socket. Aborting operation.
[38503.929147] CIFS: VFS: cifs_mount failed w/return code = -111
[38514.151574] CIFS: Attempting to mount \\192.168.50.112\Home_Network
[38514.152089] CIFS: VFS: Error connecting to socket. Aborting operation.
[38514.152093] CIFS: VFS: cifs_mount failed w/return code = -111
[38514.154478] CIFS: Attempting to mount \\192.168.50.112\Highwind
[38514.155027] CIFS: VFS: Error connecting to socket. Aborting operation.
[38514.155030] CIFS: VFS: cifs_mount failed w/return code = -111
[38524.401687] CIFS: Attempting to mount \\192.168.50.112\Home_Network
[38530.573481] CIFS: VFS: Error connecting to socket. Aborting operation.
[38530.573500] CIFS: VFS: cifs_mount failed w/return code = -113
[38530.583709] CIFS: Attempting to mount \\192.168.50.112\Highwind
[38536.717452] CIFS: VFS: Error connecting to socket. Aborting operation.
[38536.717470] CIFS: VFS: cifs_mount failed w/return code = -113
[38546.906260] CIFS: Attempting to mount \\192.168.50.112\Home_Network
[38553.037477] CIFS: VFS: Error connecting to socket. Aborting operation.
[38553.037500] CIFS: VFS: cifs_mount failed w/return code = -113
[38553.047453] CIFS: Attempting to mount \\192.168.50.112\Highwind
[38559.181472] CIFS: VFS: Error connecting to socket. Aborting operation.
[38559.181489] CIFS: VFS: cifs_mount failed w/return code = -113
[38569.405459] CIFS: Attempting to mount \\192.168.50.112\Home_Network
[38575.565512] CIFS: VFS: Error connecting to socket. Aborting operation.
[38575.565531] CIFS: VFS: cifs_mount failed w/return code = -113
[38575.575489] CIFS: Attempting to mount \\192.168.50.112\Highwind
[38576.590737] CIFS: VFS: Error connecting to socket. Aborting operation.
[38576.590754] CIFS: VFS: cifs_mount failed w/return code = -111
[38586.666036] CIFS: Attempting to mount \\192.168.50.112\Home_Network
[38587.237966] CIFS: Attempting to mount \\192.168.50.112\Highwind
[38694.310237] CIFS: Attempting to mount \\192.168.50.112\Home_Network
[38715.695648] CIFS: Attempting to mount \\192.168.50.112\Highwind
[40075.061534] CIFS: Attempting to mount \\192.168.50.112\Highwind
[48070.483456] CIFS: Attempting to mount \\192.168.50.112\Highwind
[49306.327715] CIFS: Attempting to mount \\192.168.50.112\Highwind

Thanks!

Hi, sorry if this is complete BS and doesn’t help in any way, but…

…it might be useful to check whether selinux has a stake in that?
I remember to have had issues getting Samba to serve properly with selinux being active.
Since selinux stuff also isn’t mentioned in the how-to page linked above, I’m not sure whether it still is relevant in the Rocky8.5 days… but just to be on the safe side, it’s got something to do with

semanage fcontext -a -t samba_share_t "/your/share_path(/.*)?"

Also, see here for detailed how-tos regarding Samba and selinux:
https://www.lisenet.com/2016/samba-server-on-rhel-7/
(especially the bottom part of the page that reads “Apply SELinux Context”)

HTH, Cheers,
Thomas

@schroedingersdog has most likely hit the nail on the head. By default if everything is put under /var/lib/samba, then the selinux context will be set on the files. For directories outside of the default samba location, there will be no contexts.

Temporarily, you can do:

setenforce 0

to put selinux in permissions mode, restart samba, and then see if you can mount it. Also, you can check the /var/log/audit/audit.log file to see if your shares are popping up in this log file as that will also show if selinux is blocking it. If that does allow access, then you can enable selinux again with:

setenforce 1

and then set the contexts as mentioned above. By using setenforce, you don’t need to edit /etc/selinux/config to go from enforced to permissive (or disabled) with a reboot. setenforce does it on the fly, so no reboot needed and great for testing.