Windows Server 2019 LMHOSTS File Does Not Work

Solution 1:

Either what am I doing wrong

Most likely it is not the name resolution to blame here (which is done in your hosts), but the fileserver name itself. Windows servers do listen for requests to their name.

You can add aliases to your server with netdom:

c:\> netdom computername <computername> /add:<aliasname.fqdn.local>

You will not need to patch your hosts/lmhosts if netdom is used correctly.

Solution 2:

As said in another answer, Windows will complain if you try to call a server with a different name than its own; netdom can fix that.

But in a domain environment, there's also Kerberos to consider. In order for authentication to be successful, the server will need to have a Service Principal Name matching the name you are calling it as.

So you will also need to register an additional SPN for the server:

setspn -S CIFS/Alias Servername

(Where "Alias" is the new name and "Servername" is the actual host name of the server)