Enable Windows Server SMB 2.0 or 3.0 Alias (CNAME)

      Comments Off on Enable Windows Server SMB 2.0 or 3.0 Alias (CNAME)

Windows Server SMB

Windows Server SMB

If you have an existing Windows 2008 R2 or Windows 2012 R2 file server and would like to add an alternate name or alias for file share access, an SMB alias needs to be created.

Example: Your existing server is named: server1 and has a fully qualified domain name of server1.mydomain.local. You would like to be able to access file shares on the server as: \\server1 as well as \\fileserver.

In previous version of Windows 2000 and 2003, a registry setting was all that was required in order to enable SMB aliasing, see Microsoft KB281308, but this only works with SMB 1.0 and not SMB 2.0. Computers that run Windows Server 2008, Windows Server 2008 R2, Windows Vista, and Windows 7 support both SMB 1.0 and SMB 2.0. Windows includes an SMB client component (Client for Microsoft Windows) and an SMB server component (File and Printer Sharing for Microsoft Windows). By default, SMB 2.0 is the file sharing protocol that is used when both client and server support it.

To add a SMB alias in Windows 2008 R2 which supports SMB 2.0, do as follows:

Add a CNAME record in your DNS pointing at the primary server name, e.g. fileserver.mifarook.local CNAME server1.mifarook.local.

  1. Open the Registry Editor (regedit) on the server and browse to: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanServer\Parameters
  2. Add a new REG_DWORD 32bit entry using the edit menu.
  • Value name: DisableStrictNameChecking
  • Data type : REG_DWORD
  • Radix : Decimal
  • Value : 1

Exit the registry editor then reboot your server.

Once the server reboots you need to add a Service Principal Name (SPN) as follows:

  1. Open the command prompt.
  2. Type: setspn -a host/fileserver server 1 (where ‘server1’ is the primary name of your server and ‘fileserver’ is the alternate name)
  3. Type: setspn -a host/fileserver.mifarook.local server1 (where fileserver.mifarook.local is the fully qualified domain name alias and server1 is the primary name of your server)

Example:

setspn -a host/fileserver server1

setspn -a host/fileserver.mifarook.local server1

 

Note:

FileServer = New Alias Name

Server1 = Original HostName

Your new SMB 2.0 alias should  now be configured. Browse to \\fileserver.

These instructions have been confirmed to work with Windows Server 2012 R2 with SMB 3

Next Post