Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


February 1998

NLTEST


RSS
Subscribe to Windows IT Pro | See More Resource Kit Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

A trust monitor

Trust can be so hard to keep. Relationships break down. If you have many trusts in your Windows NT enterprise network, you're likely to find that some pair of domains that should trust one another don't. NetLogon, the service that provides secure NT-to-NT communications, has failed. NetLogon communications serve three important relationships: connections between an NT machine and its domain controller (adding a machine to a domain establishes a kind of trust relationship), connections between Primary Domain Controllers (PDCs) and Backup Domain Controllers (BDCs—synchronizing the domain's Security Accounts Manager—SAM—database requires a trust link), and standard, domain-to-domain trust relationships. Any one of these links can dissolve, causing mysterious problems.

Microsoft Windows NT Server Resource Kit and Microsoft Windows NT Workstation Resource Kit include a tool, nltest.exe, that lets you quickly test the status of the NetLogon linkages between machines. This utility usually can't repair trust relationships, but because NLTEST is a command-line tool, you can incorporate it into batch files to automatically monitor machine connections.

To test a machine's link to its domain, you use NLTEST's /query option, which verifies that NetLogon is running. For example, if you have an NT server (or NT workstation) named MINBAR and want to see if NetLogon is running and functioning properly on that machine, open a command line and type

nltest /server:minbar /query

You'll see a few messages and finally the Command completed successfully message.

Each active domain member should have a functioning secure channel to a domain controller. To check that status, you use the /sc_query option. If MINBAR is a member of a domain named B5, you test its domain connection with

nltest /server:minbar /sc_query:B5

The command responds with success or failure, and provides the name of the domain controller that MINBAR has a secure channel to. If the command reports a problem, you can replace /sc_query with /sc_reset to try to reset the secure connection. The /sc_reset option might also work to reset a broken trust relationship.

NetLogon also governs PDC-BDC communications. You can find out what machines are domain controllers on a domain with the /dclist option. For the B5 domain example, you can list the domain controllers with

nltest /dclist:b5

You can get the name of the PDC with /dcname.

You can control PDC-BDC SAM replications with the /repl option or resynchronize the entire SAM database with the /sync option. For example, if you have a BDC named AJAX, you can force that BDC to dump its copy of the domain's SAM and request a new one from the domain's PDC with

nltest /server:ajax /sync

To tell the BDC to request the changes to the SAM since the last replication, replace /sync with /repl. If that domain has a PDC named XERXES, you can initiate the process from the PDC's side with

nltest /server:xerxes /pdc_repl

Domain-domain trust relationships get a little tricky. The /trusted_domains option shows you what domains are trusted by the domain that your machine is in. Suppose you have a two-domain enterprise with domains MASTER and RESOURCE. All the user accounts are in MASTER, and all the NT machines are members of domain RESOURCE. You've established a trust relationship so that RESOURCE trusts MASTER. You're logged on to a machine with your user account, which lives in domain MASTER, and the machine you're logged on to is a member of domain RESOURCE. If you run

nltest /trusted_domains

you'll be told that MASTER is trusted. The fact that you're logged on as a member of MASTER is irrelevant. The message means that RESOURCE, the machine's domain, trusts MASTER. If you logged on to the domain controller at MASTER and ran the same command, you'd get a blank list.

NLTEST lets you determine whether you can establish a NetLogon session with a particular machine. If NetLogon is up, you can use the /sc_query option to test connections to a domain controller and the /sc_reset option to try to repair a link. The remaining options let you examine a machine's link to its domain, PDC-BDC connections, and trust relationships.

End of Article



Reader Comments
Almost all possible tests have been discussed.But it would be better if you also include diagnostics for errors that might occur in these cases.



G.Vidhya November 12, 2003


the best

knut99 May 21, 2009 (Article Rating: )


You must be a registered user or online subscriber to comment on this article. Please log on before posting a comment. Are you a new visitor? Register now




Top Viewed ArticlesView all articles
Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

WinInfo Short Takes: Week of November 9, 2009

An often irreverent look at some of the week's other news, including some more Windows 7 sales momentum, some Sophos stupidity, Microsoft's cloud computing self-loathing, more whining from the browser makers, Zoho's "Fake Office," and much, much more ...

Understanding File-Size Limits on NTFS and FAT

A general confusion about files sizes on FAT seems to stem from FAT32's file-size limit of 4GB and partition-size limit of 2TB. ...


Related Events WinConnections and Microsoft® Exchange Connections

Deep Dive into Windows Server 2008 R2 presented by John Savill

Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Related Windows OSs Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement