[Samba] Unable to access shares by server alias
rpenny at samba.org
Fri May 22 07:58:53 UTC 2020
On 22/05/2020 06:38, Lorenzo Milesi via samba wrote:
>> Verify dig -x $(hostname -i)
>> Then dig A $(hostname -f)
>> As long as these match any CNAME should work.
> These works, but why these should match a CNAME? hostname returns the "main" host...
> Anyway to make a test I configured a new CNAME
> # dig server.wdc.mydomain.it
> ;; ANSWER SECTION:
> server.wdc.mydomain.it. 900 IN CNAME fileserver.wdc.mydomain.it.
> fileserver.wdc.mydomain.it. 900 IN A 10.0.0.3
> So the CNAME works. I also configured spn:
> # samba-tool spn list fileserver$
> But when I try accessing the shares with \\SERVER\whatever
> [2020/05/21 17:09:10.440340, 3] ../../source3/smbd/smb2_server.c:3274(smbd_smb2_request_error_ex)
> smbd_smb2_request_error_ex: smbd_smb2_request_error_ex: idx status[NT_STATUS_INVALID_PARAMETER] || at ../../source3/smbd/smb2_ioctl.c:312
The problem is that you are mixing up netbios and short hostnames.
'netbios' relies on SMBv1 and hostnames rely on DNS, AD requires DNS, so
if you want your computer to have more than one name, you must use a
CNAME. The next problem has come over the horizon, SMBv1 is going away,
recent versions of Windows and Samba have it turned off by default and
you need it for browsing. You had better get used to another way of
doing things, there is ongoing work to remove SMBv1 entirely from Samba.
More information about the samba