Wednesday, June 23, 2004

Google

How Domain Controllers Are Located in Windows XP

Just in case this disappears...
Microsoft Knowledge Base Article - 314861

How Domain Controllers Are Located in Windows XP

This article was previously published under Q314861
For a Microsoft Windows 2000 version of this article, see 247811.

SUMMARY
This article describes the mechanism that Windows XP Professional uses to locate a domain controller in a Windows-based domain.

The article details the process of locating a domain by its DNS-style name and by its flat-style (NetBIOS) name, which is used for backward compatibility. In all other cases, it is recommended that you use DNS-style names as a matter of policy.

The article also addresses issues that are involved in troubleshooting the domain controller location process.
MORE INFORMATION
The following sequence describes how the Locator finds a domain controller:
On the client (the computer that is trying to locate the domain controller), the Locator is initiated as a remote procedure call (RPC) to the local Netlogon service. The Netlogon service implements the Locator DsGetDcName API call.
The client collects the information that is needed to select a domain controller, and then passes the information to the Netlogon service by using the DsGetDcName call.
The Netlogon service on the client uses the collected information to look up a domain controller for the specified domain in one of two ways:
For a DNS name, Netlogon queries DNS by using the IP/DNS-compatible Locator--that is, DsGetDcName calls the DnsQuery call to read the Service Resource (SRV) records and "A" records from DNS after the domain name is appended to the appropriate string that specifies the SRV records.

A workstation that is logging on to a Windows-based domain queries DNS for SRV records in this general form:
_service._protocol.DnsDomainName

Active Directory servers offer the Lightweight Directory Access Protocol (LDAP) service over the TCP protocol. Therefore, clients find an LDAP server by querying DNS for a record of the form:
_ldap._tcp.DnsDomainName

For a NetBIOS name, Netlogon performs domain controller discovery by using the Microsoft Windows NT 4.0-compatible Locator--that is, by using the transport-specific mechanism, for example, Windows Internet Name Service (WINS).

In Windows NT 4.0 and earlier, "discovery" is a process for locating a domain controller for authentication in either the primary domain or in a trusted domain.
The Netlogon service sends a datagram to the computers that registered the name. For NetBIOS domain names, the datagram is implemented as a mailslot message. For DNS domain names, the datagram is implemented as an LDAP User Datagram Protocol (UDP) search.

UDP is the connectionless datagram transport protocol that is part of the TCP/IP protocol suite. TCP is a connection-oriented transport protocol. Note that UDP allows a program on one computer to send a datagram to a program on another computer. UDP includes a protocol port number, which allows the sender to distinguish among multiple destinations (programs) on the remote computer.
Each available domain controller responds to the datagram to indicate that it is working and returns the information to DsGetDcName.
The Netlogon service caches the domain controller information so that subsequent requests do not need to repeat the discovery process. Caching this information encourages consistent use of the same domain controller and a consistent view of Active Directory.
When a client logs on or joins the network, the client must be able to locate a domain controller. The client sends a DNS Lookup query to DNS to find domain controllers, preferably in the client's own subnet. Therefore, clients find a domain controller by querying DNS for a record of the form:
_LDAP._TCP.dc._msdcs.domainname

After the client locates a domain controller, the client establishes communication by using Lightweight Directory Access Protocol (LDAP) to gain access to Active Directory. As part of that negotiation, the domain controller identifies which site the client is in, based on the IP subnet of that client. If the client is communicating with a domain controller that is not in the closest (most optimal) site, the domain controller returns the name of the client's site.

If the client has already tried to find domain controllers in that site (for example, when the client sends a DNS Lookup query to DNS to find domain controllers in the client's own subnet), the client uses the domain controller that is not optimal. Otherwise, the client performs a site-specific DNS lookup again by using the name of the optimal site. The domain controller uses some of the directory service information for identifying sites and subnets.

After the client locates a domain controller, the domain controller entry is cached. If the domain controller is not in the optimal site, the client flushes the cache after 15 minutes and discards the cache entry. The client then attempts to find an optimal domain controller in its own site.

After the client has established a communications path to the domain controller, the client can establish its logon and authentication credentials and, if necessary for Windows-based computers, set up a secure channel. The client then is ready to perform normal queries and search for information against the directory.

The client establishes an LDAP connection to a domain controller to log on. The logon process uses Security Accounts Manager (SAM). Because the communications path uses the LDAP interface and the client is authenticated by a domain controller, the client account is verified and passed through SAM to the directory service agent, then to the database layer, and finally to the database in the Extensible Storage engine (ESE).
Troubleshooting the Domain Locator Process
To troubleshoot the domain locator process:
Check Event Viewer to see whether the event logs contain any error information. On both the client and the server, check the System log for failures during the logon process. Also, check the Directory Service logs on the server and the DNS logs on the DNS server.

To view Event Viewer in Windows XP, click Start, click Control Panel, double-click Administrative Tools, and then double-click Event Viewer.
Check the IP configuration by running the ipconfig /all command at a command prompt. Verify that the configuration is correct for your network.
Use the Ping utility to verify network connectivity and name resolution. Ping both the IP address and the server name.
Check the Network Diagnostics tool in Help and Support under "Use Tools to view your computer information and diagnose problems" to determine whether the network components are correctly installed and working properly. Network Diagnostics also runs some tests and provides information about the network configuration, information that can be helpful.
Use the nltest /dsgetdc:domainname command to verify that a domain controller can be located for a specific domain. The NLTest tool is installed with the Windows XP support tools.

For information about how to install these tools, refer to the following article in the Microsoft Knowledge Base:
306794 How to Install the Support Tools from the Windows XP CD-ROM

Use the NSLookup tool to verify that DNS entries are correctly registered in DNS. Verify that the server host records and GUID SRV records can be resolved.

For example, to verify record registration, use the following commands:
nslookup server_name.child_of_root_domain.root_domain.com

nslookup guid._msdcs.root_domain.com

If either of these commands does not succeed, use one of the following methods to reregister records with DNS:
To force host record registration, type ipconfig /registerdns.
To force domain controller service registration, stop and then restart the Netlogon service.
To verify appropriate LDAP connectivity, use the Ldp.exe tool to connect and bind to the domain controller. Ldp.exe is a support tool that you can install from the Windows XP CD-ROM.

For information about how to install these tools, refer to the following article in the Microsoft Knowledge Base:
306794 How to Install the Support Tools from the Windows XP CD-ROM

If you suspect that a particular domain controller has problems, turn on the Netlogon debug logging. Use the NLTest utility by typing nltest /dbflag:0x2000ffff at a command prompt. The information is logged in the Debug folder in the Netlogon.log file.
If you still have not isolated the problem, use Network Monitor to monitor network traffic between the client and the domain controller.
For additional information, refer to the Windows 2000 Server Resource Kit, Chapter 10, "Active Directory Diagnostic, Troubleshooting, and Recovery."

Wednesday, June 09, 2004

Google

ANI numbers. If you don't know what ANI is, then these won't help you...


ANI
1010732-1-770-988-9664
800-444-4444
800-555-1140
800-555-1180

-More-
800-300-4206
800-314-4258
800-444-0800
800-444-3333
800-444-4444
800-532-7486 press 1
800-552-8355
800-555-1140
800-555-1180
800-729-0056
800-732-2468 (800-REACH-OUT)
800-789-4779
800-797-6088
800-877-2278
800-964-0176
800-964-0221
877-265-5343 (877-COLLEGE) press 8, then 1
888-253-8225
888-253-8226
888-253-8227
888-253-8229
888-253-8249
888-253-8251
888-253-8253
888-253-8254
888-776-5733

Thursday, June 03, 2004

Google

Got popups out the wazzoo, a bunch of "Missing Shortcut" boxes at startup and all sorts of gibberish programs running in your task list? You've got the latest spyware/adware scourge. Use these instructions to rid yourself of the pest. You'll need a copy of HijackThis and a strong cocktail before you start. I also ran Ad-aware 6 before and after the process.

** You can follow the below steps. A workable shortcut is also to remove autorun entries, and especially browserhelper.dll! **



Since morze1.exe disappears soon after it morphs into random selected 600K files...

Let's name this tool the "MORZE1 REMOVAL TOOL"

Removal:

Right-Click on the Yahoo stocks task bar icon, choose remove (while being online!). A web page from Adtomi should appear "uninstall was successful!"



Restart computer in safe mode ONLY!




Make a new text file in Notepad, copy and paste this inside:


REGEDIT4

[-HKEY_CURRENT_USER\Software\adtomi]

[-HKEY_CLASSES_ROOT\CLSID\{B549456D-F5D0-4641-BCED-8648A0C13D83}]

[-HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\explorer\Browser Helper Objects\{B549456D-F5D0-4641-BCED-8648A0C13D83}]

Save it (Change to "all files" in Files of Type drop-down box) as Remove.reg Double-click and hit yes on the prompt! (If you want to save yourself the hassle of creating this file, download it here.)




In HijackThis or similar startup manager, delete any entries with the following pattern:

With random, unknown .exe files, ending with "/dk" - Example: (C:\WINDOWS\IH5B0AKB.EXE /dk )

Delete any such entries in HKCU....\Software\Microsoft\Windows\CurrentVersion\Run

Delete any such entries in HKLM....\..run......



In HijackThis fix the 02 line BHO -if present: C:\WINDOWS\BrowserHelper.dll




Google

During boot up, you get an error SPOOLSV.EXE has generated errors, and you can't print, and there may not even be any printers in the printer folder. You may not be able to add any printers.

This can be caused by a damaged printer driver. See the following knowledgebase article Q312052.

Since some of these articles seem to disappear, here is the good part.
NOTE: I have successfully resolved the problem by merely deleting the non-default printer driver in the currentcontrolset/controlset001 areas. You may have to do more...


RESOLUTION
WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

To resolve this issue, remove printers and printer drivers, and then delete the items that are under certain keys in the registry. Follow these steps:
If possible, remove any printers that are listed in the Printers window.

To remove a printer, right-click the printer in the Printers window, click Delete, and then click Yes to confirm the deletion.
In the Printers window, on the File menu, click Server Properties.
On the Drivers tab, remove all of the installed printer drivers.

To remove a printer driver, click the driver, click Remove, and then click Yes to confirm.
Start Registry Editor (Regedit.exe).
Export the following registry keys:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Print

Delete any items that are listed under the following keys (do not delete the keys themselves):
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows NT x86\Drivers\Version-2

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows NT x86\Drivers\Version-3

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Print\Environments\Windows NT x86\Drivers\Version-2

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Print\Environments\Windows NT x86\Drivers\Version-3

Delete any non-default items that are listed under the following keys:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Print\Monitors
The list of Default monitors includes:


AppleTalk Printing Devices (When Services for Macintosh is installed)
BJ Language Monitor
Local Port
PJL Language Monitor
Standard TCP/IP Port
USB Monitor
Windows NT Fax Monitor (When a Fax Modem is installed)

Tuesday, June 01, 2004

Google

Having problems with a computer, completely infested with spyware.
Ran Spybot Search & Destroy but it had lots of trouble closing. Ad-Aware picked up lots more stuff (usually it's the other way around!) but that's not the point of this post...

Anyway, in looking at the task manager, I noticed a few processes that I tracked down to GotoMyPC:
g2svc.exe
g2comm.exe
g2tray.exe

FYI