Home > Active Directory, Tips, Windows 2000, Windows 2003, Windows 2008, Windows 7 > Connecting to SMB share with an alias name (CNAME)

Connecting to SMB share with an alias name (CNAME)

In the Microsoft Knowledge Base article number 281308 of the December 4, 2008 is written:

The registry key that is mentioned in the “Resolution” section is supported in Windows
Server 2008. However, it works only for Server Message Block (SMB) version 1. It does not work for SMB version 2, also known as CIFS (Common Internet File System). By default, CIFS is the file sharing protocol that is used on Windows-based computers. Windows includes an SMB client component (Client for Microsoft Windows) and an SMB server component (File and Printer Sharing for Microsoft Windows). Windows Server 2008 and Windows Vista support the new SMB 2.0.

At first reading it appears that the suggestion proposed in the KB281308 does not apply to Windows 2008/Vista/7 … In the same KB281308, but updated to September 28, 2009, we reads rather:

The registry key that is mentioned in the “Resolution” section is applicable only to SMB 1.0. To communicate over the SMB2.0 protocol, or CIFS (Common Internet File System), you do not have to set the registry key. SMB 2.0 allows for the functionality described in this article to work by default without additional configuration. 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.

All other music … If you have a Windows server 2008 with hostname (NetBIOS Name) Galileo (galileo.homeworks.it as FQDN) and that server have a shared resource called Saturn and instead to use the UNC path \ \Galileo\Saturn you would like to use the UNC path \ \Newton\Saturn, where Newton (newton.homeworks.it) is an alias DNS (CNAME) for Galileo, then you need to follow the following recipe:

  • for clients with Windows 2008/Vista/7: creates the DNS alias (CANME) called Newton (newton.homeworks.it) associated to the server Galielo (galileo.homeworks.it);
  • for clients with Windows 2000/2003/XP:
    • creates the DNS alias (CANME) called Newton (newton.homeworks.it) associated to the server Galielo (galileo.homeworks.it);
    • connected to server Galileo with the credentials of a user with administrative rights on the server;
    • start Registry Editor (Regedt32.exe);
    • locate and click the following key in the registry: HKEY_LOCAL_MACHINE\System
      \CurrentControlSet\Services\LanmanServer\Parameters
    • on the Edit menu, click Add Value, and then add the following registry value:
      Value name: DisableStrictNameChecking
      Data type: REG_DWORD
      Radix: Decimal
      Value: 1
    • quit Registry Editor;
    • restart the server Galileo.

Once you restarted the server Galileo, execute from the Command Prompt of Galileo the following commands: setspn -a host/newton galileo and setspn -a host/newton.homeworks.it galileo Or more generally: setspn -a host/<CNAME_Server> <NetBIOS_Name_Server> and setspn -a host/<CNAME_FQDN_Server> <NetBIOS_Name_Server>

Now to access the shared resource (SMB share) Saturn you can use or the UNC path \ \Galileo\Saturn, or the UNC path \ \Newton\Saturn.

This recipe is good for Windows 2000/2003/2003R2 (Windows 2000 should have installed Service Pack 4) and Windows 2008/2008R2. Note that the command setspn.exe is not pre-installed on Windows 2003R2, but  is part of the Windows 2003 Support Tools.

  1. kz
    17/10/2010 at 23:33

    Genius!

  2. Chris Hutchcroft
    13/12/2010 at 18:59

    Works great. Even tried from an NT4 client and it worked.

  3. donAL
    29/06/2011 at 13:41

    Great post,

    What about Cluster-based SMB alias?

    Maybe there is something else to configure in order to work

  4. Joanne
    21/09/2011 at 07:57

    Can access share as above from a std user a/c but with an a/c with administrator rights, I need to use the physical server name.

    Ideas?

    • 24/09/2011 at 18:33

      You could to try to ensure that there is a problem with permissions on the shared directory. I am sorry, but I do not understand ver well your problem.

      Bye,

      Alessandro

  5. Andrea
    24/08/2012 at 11:34

    10x for this howto..😉

  6. julien@mergen.fr
    20/06/2014 at 08:57

    Thanks a lot for this KB

  1. 06/08/2010 at 23:09
  2. 07/08/2010 at 00:12
  3. 07/08/2010 at 00:32
  4. 07/08/2010 at 02:31
  5. 18/11/2010 at 21:24
  6. 04/07/2011 at 12:44

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: