Sunday, May 9, 2010

Creating a NetBIOS alias for the local machine

My current assignment is with a client that has a system consisting of multiple components where each component is a separate .EXE. This wouldn’t be so bad except for the configuration problem that is created. Each component has its own config file and there is a requirement for some consistency between the config files for some values. In addition, the system is deployed to multiple environments and clients.

Configuration is a nightmare and we’re still doing it manually.

This past week, one of the team members thought of the idea of using aliases instead of referring to actual machine names (for file and application location). The thought was that we could define the aliases in the Hosts file and reference the loopback address (127.0.0.1).

Eh, no.

Using the Hosts file works well for HTTP but has no affect on UNC paths.

Luckily this client has an infrastructure group and they were able to help us out. They identified four registry entries that have to be changes in order to create aliases for the local machine.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters Add a new Multi-String value called OptionalNames. Enter one or more aliases, one per line.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters Add a new DWORD value called DisableStrictNameChecking and set to 1.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters Add a new DWORD value called DisableLoopBackCheck and set to 1.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0
Add a new Multi-String Value BackConnectionHostNames. Enter one or more aliases, one per line.

You’ll have to cycle the machine for the configuration to take affect.

3 comments:

  1. you seem to know about the registry entries....
    I had some virus's that Mcafee didn't notice.
    started using anvisoft smart defender. seemed it found the problems.
    Now I ended up doing a system reset from partition.

    my question is this... every time I boot windows, anvisoft has a popup asking for permission to allow or block = "registry/machine/system/controlset001/services/lanmanserver/parameters"
    what is this action? and should I block or allow it? I would really be greatfull if anyone could let me know. I can't find anything in forums.
    If you know what it is please E mail me and let me know.
    cocokasper@gmail.com
    THANKS ;)

    ReplyDelete
    Replies
    1. Sorry Casey. I'm not going to be able to help you. Did you try posting a message in the Anvisoft support forums?

      Delete
  2. Thanks -- this helped me tonight in a recovery effort. BTW you don't have to restart the computer -- if you restart the server and workstation services it seems to take these new changes (this also causes netlogon and computer browser services to restart). I was told I couldn't reboot this new system..... working like a charm w/ only those services quickly restarted.
    Danke!

    ReplyDelete