Windows domain authentication using HOST files

34,151

Solution 1

Unfortunately, no. The hosts file is only a suitable replacement for proper DNS when you need host (A) records and their associated reverse lookup (PTR) records.

Active Directory also requires a bunch of SRV records to function, which you can see in your DNS setup under the _msdcs.mydomain.com DNS zone; these records cannot be set up with just a hosts file.

This article documents the necessary non-host records (in the context of setting up a BIND server to serve them)

Solution 2

I know this is dead-thread revival, but here goes. According to

https://technet.microsoft.com/en-us/library/cc959846.aspx

and

https://support.microsoft.com/en-us/kb/180094

you can add entries in an LMHOSTS file for the domain controller. The file resides at C:\Windows\System32\Drivers\etc and is called LMHOSTS (no extension). The format for the domain controller entry is:

10.0.0.1 PDCNAME #PRE #DOM:DOMAIN-NAME

10.0.0.1 "DOMAIN-NAME \0x1b" #PRE

Share:
34,151

Related videos on Youtube

Admin
Author by

Admin

Updated on September 17, 2022

Comments

  • Admin
    Admin almost 2 years

    I am currently setting up remote office PCs running Windows 7 Professional to authenticate back to a domain controller running Windows 2008 R2 in the headquarters. Is it possible to simply define the domain name of the domain controller using the local PC's hosts file instead of having to query a DNS server?

  • BoxerBucks
    BoxerBucks over 13 years
    Shane is absolutely correct, you have to have the service records in DNS to find domain services like kerberos, ldap and DC's to authenticate to. If you have a remote office that is even badly connected to the network, you can setup a simple DNS server that simply does zone transfers from your home office and point your clients to that.