[Samba] Having problem with [homes] share

Joshua Kramer joskra42.list at gmail.com
Sun Jul 16 17:09:27 UTC 2023


Hello!

I have a Rocky Linux 9 server running a custom compiled (against EL9) Samba
4.18.3 instance.  I have it running as an AD Domain Controller.  Everything
works great except for the [homes] share; when I try to access this share
from Windows 10 or Linux clients, it returns an error indicating that it
can't find the directory.  Here is how I have [homes] configured:

[homes]
        comment = Home Directories
        valid users = %S
        path = /srv/Main/homedirs
        read only = No
        create mask = 0700
        directory mask = 0700
        browseable = No

SELinux, for the purpose of this test, is disabled (though I will re-enable
it when I fix this issue.  If I attempt to issue a command such as this:

mount -t cifs //avs.mydomain.as/joshua ./homeshare -o username=
joshua at mydomain.as

I get:

mount error(2): No such file or directory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log
messages (dmesg)

Looking in the kernel messages I see this:

[ 5682.235784] CIFS: Attempting to mount //avs.mydomain.as/joshua
[ 5682.272353] CIFS: VFS:  BAD_NETWORK_NAME: \\avs.mydomain.as\joshua
[ 5682.273414] CIFS: VFS: cifs_mount failed w/return code = -2

If I increase the Samba loglevel up to 9, the only real clues that I see,
is a message related to the BAD_NETWORK_NAME.

I have double-checked the actual file path on the disk and it's set to 777
(to facilitate testing).  I've also checked the /etc/krb5.conf file which
appears to be valid.

What problems can cause BAD_NETWORK_NAME?  It is worth noting that this
used to be a CentOS 7 server, same Samba version (though compiled against
EL7 instead of EL9), and in that case the home directories worked.

Thanks!
-JK


More information about the samba mailing list