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 usernamejoshua 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
On 16/07/2023 18:09, Joshua Kramer via samba wrote:> 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 = NoSamba doesn't recommend using an AD DC as a fileserver, but if you are going to do this, it is probably a good idea to do it correctly. The '[homes]' share is a bit special, it doesn't use the 'path' parameter, it uses either the 'template homedir' parameter in 'global' or the unixHomedir attribute in AD. If you really need to use the 'path' parameter, then use '[home]' instead of '[homes]' and add '%U' to the path, also change '%S' to '%U' You will also need to set the share permissions from Windows. Rowland