Thursday, July 22, 2010

Active Directory Performance

Active Directory Performance

The System Monitor object NTDS is useful for monitoring domain controller performance.
The below counters in the Performance Monitor tool show replication traffic information.

  • DRA Inbound Bytes Total/sec
  • DRA Outbound Bytes Total/sec
  • DRA Inbound Bytes Not Compressed - Replicated uncompressed bytes that are probably from a Directory Services Agent (another controller sending data) in the same site.
  • DRA Inbound Bytes Compressed (Before Compression) - Replicated bytes received (as though in uncompressed form).
  • DRA Inbound Bytes Not Compressed (After Compression) - Replicated bytes received (as in compressed form).
  • DRA Inbound Bytes Total The sum of the DRA Inbound Bytes Not Compressed plus the DRA Inbound Bytes Not Compressed (After Compression).
  • DRA Outbound Bytes Not Compressed - Replicated uncompressed bytes that are being sent to another domain controller in the same site.

Active Directory Replication Monitor

The Active Directory Replication Monitor is used to monitor Active Directory database replication between domain controllers.
The Active Directory Replication Monitor is run by selecting "Start", "Run", and typing "replmon" on the command line.
 You can add monitored servers to its monitor list. Replication can be forced by right clicking on a partition, then selecting "Synchronize this Directory Partition with All Servers".

Some of the following functions can be done with Active Directory Replication Monitor.:

  • Manually make two domain controllers replicate Active Directory database information between each other.
  • View replication partner information.
  • View unreplicated objects, list object metadata, and find out why a replication attempt may have failed.
  • Log and monitor the domain or forest replication state and statistics.
  • Change replication time intervals.
  • Setup the system response to exceeding replication thresholds. The system response may be to log the event or send an e-mail.

Network Monitor

This tool can be used to observe replication data and help with diagnosis of any replication problems. TCP port 25 is monitored to observe replication using mail transfers. When RPC is used for replication, which is the normal method, the following entry in the registry may be modified to a particular port number to cause RPC traffic to use the same port:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\NTDS\Parameters\TCP/IP Port

Active Directory Queries

LDAP queries are used by Active Directory to find objects and the query is passed from domain controller to domain controller until the object is found. Active directory objects must be in the current tree for an LDAP query to find the object.
Adding more global catalog servers will make searching the forest faster, but more network bandwidth will be required for replication between global catalog servers.

Monday, July 19, 2010

FSMO

FSMO (Flexible Single Master Operations)


Flexible Single Master of Operation, or just single master operation or operations master, is a feature of Microsoft's Active Directory (AD). the term FSMO has been deprecated in favor of operations masters.
FSMOs are specialized domain controller (DC) tasks, used where standard data transfer and update methods are inadequate. AD normally relies on multiple peer DCs, each with a copy of the AD database, being synchronized by multi-master replication. The tasks which are not suited to multi-master replication, and are viable only with a single-master database, are the FSMOs.


The Five FSMO Roles

There are just five operations where the usual multiple master model breaks down, and the Active Directory task must only be carried out on one Domain Controller.  FSMO roles:

PDC Emulator - Most famous for backwards compatibility with NT 4.0 BDC's.  However, there are two other FSMO roles which operate even in Windows 2003 Native Domains, synchronizing the W32Time service and creating group policies.  I admit that it is confusing that these two jobs have little to do with PDCs and BDCs.
RID Master - Each object must have a globally unique number (GUID).  The RID master makes sure each domain controller issues unique numbers when you create objects such as users or computers.  For example DC one is given RIDs 1-4999 and DC two is given RIDs 5000 - 9999.
Infrastructure Master - Responsible for checking objects in other other domains.  Universal group membership is the most important example.  To me, it seems as though the operating system is paranoid that, a) You are a member of a Universal Group in another domain and b) that group has been assigned Deny permissions.  So if the Infrastructure master could not check your Universal Groups there could be a security breach.
Domain Naming Master - Ensures that each child domain has a unique name.  How often do child domains get added to the forest?  Not very often I suggest, so the fact that this is a FSMO does not impact on normal domain activity.  My point is it's worth the price to confine joining and leaving the domain operations to one machine, and save the tiny risk of getting duplicate names or orphaned domains.
Schema Master - Operations that involve expanding user properties e.g. Exchange 2003 / forestprep which adds mailbox properties to users.  Rather like the Domain naming master, changing the schema is a rare event.  However if you have a team of Schema Administrators all experimenting with object properties, you would not want there to be a mistake which crippled your forest.  So its a case of Microsoft know best, the Schema Master should be a Single Master Operation and thus a FSMO role.

How many FSMO Domain controllers in your Forest?

Three of the FSMO roles (1. 2. and 3.) are held in each domain, whilst two (4. 5.) are unique to the entire forest.  Thus, if you have three domains there will be 3 PDC emulators, but only 1 Schema Master.

Wednesday, July 14, 2010

It's Microsoft Patch July 2010

Security Patches

MS10-042/KB2229593 - Critical (XP)/Low (2003): This is the patch for the Help bug that was publically disclosed in June. You will want to apply it immediately. 745KB - 2.2MB

MS10-043/KB2032276 - Critical (W7)/Important (2008 R2): A problem with the Canonical Display Driver is allowing remote code execution attacks. Even though Windows’ randomization of memory makes it hard for this attack to execute code, you should install this patch as soon as you can. 475KB - 623KB

MS10-044/KB982335 - Critical (Office 2007, Office 2007): There’s a security problem in the Microsoft Office Access ActiveX controls which can allow remote code execution attacks. This fix resolves the problem. Since you should not be allowing untrusted Web sites to run ActiveX, you can wait until your next patch cycle for this one.  3.7MB - 10.3

MS10-045/KB978212 - Important (Office XP, Office 2003, Office 2007): This patch resolves an issue in Outlook that allows remote code execution attacks with the same rights as the logged in user if the user opens an attachment. Microsoft downgrades this because of the limited rights, but I think it is much more important due to it being an issue with opening attachments. I suggest that you install this patch quickly. 4.2MB - 12.5MB

Other Updates

KB982300 - An update for Windows 7 and Server 2008 R2 to resolve an issue where some computers crash on restart if they have certain LSI 1394 (FireWire) controllers. 160KB - 200KB

Monday, July 5, 2010

Directory Service Commands

Directory Service (DS) built-in tools for Windows Server 2003
The DS (Directory Service) group of commands are split into following two families

1.
DSadd - add Active Directory users and groups

DSmod - modify Active Directory objects

DSrm - to delete Active Directory objects

DSmove - to relocate objects

DSQuery - to find objects that match your query attributes

DSget - list the properties of an object

DS Syntax

These DS tools have their own command structure which you can split into five parts:

1 2 3 4 5

Tool object "DN" (as in LDAP distinguished name) -switch value For example:

DSadd user "cn=billy, ou=managers, dc=cp, dc=com" -pwd cX49pQba

This will add a user called Billy to the Managers OU and set the password to cx49Qba

Here are some of the common DS switches which work with DSadd and DSmod

-pwd (password) -upn (userPrincipalName) -fn (FirstName) -samid (Sam account name).

The best way to learn about this DS family is to logon at a domain controller and experiment from the command line. I have prepared examples of the two most common programs. Try some sample commands for DSadd.

˚
2.
Two most useful Tools: DSQuery and DSGet

The DSQuery and DSGet remind me of UNIX commands in that they operate at the command line, use powerful verbs, and produce plenty of action. One pre-requisite for getting the most from this DS family is a working knowledge of LDAP.

If you need to query users or computers from a range of OU's and then return information, for example, office, department manager. Then DSQuery and DSGet would be your tools of choice. Moreover, you can export the information into a text file