• Chapter 1. Installing and Configuring Windows Server 2003
  • software development Company Server 2003
  • Chapter 1. Installing and Configuring Windows Server 2003
  • New Features in Windows Server 2003
  • Best Practices
  • Moving Forward
  • Version Comparisons
  • Hardware Recommendations
  • Installation Checklist
  • Functional Overview of Windows Server 2003 Setup
  • Installing Windows Server 2003
  • Post Setup Configurations
  • Functional Description of the Windows Server 2003 Boot Process
  • Correcting Common Setup Problems
  • Chapter 2. Performing Upgrades and Automated Installations
  • New Features in Windows Server 2003
  • NT4 Upgrade Functional Overview
  • Upgrading an NT4 or Windows 2000 Server
  • Automating Windows Server 2003 Deployments
  • Moving Forward
  • Chapter 3. Adding Hardware
  • New Features in Windows Server 2003
  • Functional Description of Windows Server 2003 Architecture
  • Overview of Windows Server 2003 Plug and Play
  • Installing and Configuring Devices
  • Troubleshooting New Devices
  • Moving Forward
  • Chapter 4. Managing NetBIOS Name Resolution
  • New Features in Windows Server 2003
  • Moving Forward
  • Overview of Windows Server 2003 Networking
  • Name Resolution and Network Services
  • Network Diagnostic Utilities
  • Resolving NetBIOS Names Using Broadcasts
  • Resolving NetBIOS Names Using Lmhosts
  • Resolving NetBIOS Names Using WINS
  • Managing WINS
  • Disabling NetBIOS-over-TCP/IP Name Resolution
  • Chapter 5. Managing DNS
  • New Features in Windows Server 2003
  • Configuring a Caching-Only Server
  • Configuring a DNS Server to Use a Forwarder
  • Managing Dynamic DNS
  • Configuring Advanced DNS Server Parameters
  • Examining Zones with Nslookup
  • Command-Line Management of DNS
  • Configuring DHCP to Support DNS
  • Moving Forward
  • Overview of DNS Domain Structure
  • Functional Description of DNS Query Handling
  • Designing DNS Domains
  • Active Directory Integration
  • Configuring DNS Clients
  • Installing and Configuring DNS Servers
  • Configuring Secondary DNS Servers
  • Integrating DNS Zones into Active Directory
  • Chapter 6. Understanding Active Directory Services
  • New Features in Windows Server 2003
  • Active Directory Support Files
  • Active Directory Utilities
  • Bulk Imports and Exports
  • Moving Forward
  • Limitations of Classic NT Security
  • Directory Service Components
  • Brief History of Directory Services
  • X.500 Overview
  • LDAP Information Model
  • LDAP Namespace Structure
  • Active Directory Namespace Structure
  • Active Directory Schema
  • Chapter 7. Managing Active Directory Replication
  • New Features in Windows Server 2003
  • Replication Overview
  • Detailed Replication Transaction Descriptions
  • Designing Site Architectures
  • Configuring Inter-site Replication
  • Controlling Replication Parameters
  • Special Replication Operations
  • Troubleshooting Replication Problems
  • Moving Forward
  • Chapter 8. Designing Windows Server 2003 Domains
  • New Features in Windows Server 2003
  • Design Objectives
  • DNS and Active Directory Namespaces
  • Domain Design Strategies
  • Strategies for OU Design
  • Flexible Single Master Operations
  • Domain Controller Placement
  • Moving Forward
  • Chapter 9. Deploying Windows Server 2003 Domains
  • New Features in Windows Server 2003
  • Preparing for an NT Domain Upgrade
  • In-Place Upgrade of an NT4 Domain
  • In-Place Upgrade of a Windows 2000 Forest
  • Migrating from NT and Windows 2000 Domains to Windows Server 2003
  • Additional Domain Operations
  • Moving Forward
  • Chapter 10. Active Directory Maintenance
  • New Features in Windows Server 2003
  • Loss of a DNS Server
  • Loss of a Domain Controller
  • Loss of Key Replication Components
  • Backing Up the Directory
  • Performing Directory Maintenance
  • Moving Forward
  • Chapter 11. Understanding Network Access Security and Kerberos
  • New Features in Windows Server 2003
  • Windows Server 2003 Security Architecture
  • Security Components
  • Password Security
  • Authentication
  • Analysis of Kerberos Transactions
  • MITv5 Kerberos Interoperability
  • Security Auditing
  • Moving Forward
  • Chapter 12. Managing Group Policies
  • New Features in Windows Server 2003
  • Group Policy Operational Overview
  • Managing Individual Group Policy Types
  • Moving Forward
  • Chapter 13. Managing Active Directory Security
  • New Features in Windows Server 2003
  • Overview of Active Directory Security
  • Using Groups to Manage Active Directory Objects
  • Service Accounts
  • Using the Secondary Logon Service and RunAs
  • Using WMI for Active Directory Event Notification
  • Moving Forward
  • Chapter 14. Configuring Data Storage
  • New Features in Windows Server 2003
  • Functional Description of Windows Server 2003 Data Storage
  • Performing Disk Operations on IA32 Systems
  • Recovering Failed Fault Tolerant Disks
  • Working with GPT Disks
  • Moving Forward
  • Chapter 15. Managing File Systems
  • New Features in Windows Server 2003
  • Overview of Windows Server 2003 File Systems
  • NTFS Attributes
  • Link Tracking Service
  • Reparse Points
  • File System Recovery and Fault Tolerance
  • Quotas
  • File System Operations
  • Moving Forward
  • Chapter 16. Managing Shared Resources
  • New Features in Windows Server 2003
  • Functional Description of Windows Resource Sharing
  • Configuring File Sharing
  • Connecting to Shared Folders
  • Resource Sharing Using the Distributed File System (Dfs)
  • Printer Sharing
  • Configuring Windows Server 2003 Clients to Print
  • Managing Print Services
  • Moving Forward
  • Chapter 17. Managing File Encryption
  • New Features in Windows Server 2003
  • File Encryption Functional Description
  • Certificate Management
  • Encrypted File Recovery
  • Encrypting Server-Based Files
  • EFS File Transactions and WebDAV
  • Special EFS Guidelines
  • EFS Procedures
  • Moving Forward
  • Chapter 18. Managing a Public Key Infrastructure
  • New Features in Windows Server 2003
  • Moving Forward
  • PKI Goals
  • Cryptographic Elements in Windows Server 2003
  • Public/Private Key Services
  • Certificates
  • Certification Authorities
  • Certificate Enrollment
  • Key Archival and Recovery
  • Command-Line PKI Tools
  • Chapter 19. Managing the User Operating Environment
  • New Features in Windows Server 2003
  • Side-by-Side Assemblies
  • User State Migration
  • Managing Folder Redirection
  • Creating and Managing Home Directories
  • Managing Offline Files
  • Managing Servers via Remote Desktop
  • Moving Forward
  • Chapter 20. Managing Remote Access and Internet Routing
  • New Features in Windows Server 2003
  • Configuring a Network Bridge
  • Configuring Virtual Private Network Connections
  • Configuring Internet Authentication Services (IAS)
  • Moving Forward
  • Functional Description of WAN Device Support
  • PPP Authentication
  • NT4 RAS Servers and Active Directory Domains
  • Deploying Smart Cards for Remote Access
  • Installing and Configuring Modems
  • Configuring a Remote Access Server
  • Configuring a Demand-Dial Router
  • Configuring an Internet Gateway Using NAT
  • Chapter 21. Recovering from System Failures
  • New Features in Windows Server 2003
  • Functional Description Ntbackup
  • Backup and Restore Operations
  • Recovering from Blue Screen Stops
  • Using Emergency Management Services (EMS)
  • Using Safe Mode
  • Restoring Functionality with the Last Known Good Configuration
  • Recovery Console
  • Moving Forward
  • Who Should Read This Book
  • Who This Book Is Not For
  • Conventions
  • Acknowledgments
  • About the Author
  • About the Technical Reviewers
  • Index
  • Index A
  • Index B
  • Index C
  • Index D
  • Index E
  • Index F
  • Index G
  • Index H
  • Index I
  • Index J
  • Index K
  • Index L
  • Index M
  • Index N
  • Index O
  • Index P
  • Index Q
  • Index R
  • Index S
  • Index SYMBOL
  • Index T
  • Index U
  • Index V
  • Index W
  • Index X
  • Index Z
  • Preface
  • Previous Section Next Section

    Performing Directory Maintenance

    Active Directory is like any other database when it comes to needing attention. Sometimes it gets filled with gaps and needs compacting. Sometimes it gets messy and needs reindexing. Sometimes it gets corrupted and needs repair. And sometimes it gets completely zonked and needs restoration. The tool for doing most of this work is the NT Directory Service Utility, Ntdsutil.

    For some of its work, Ntdsutil uses a set of canned instructions from another utility, ESENTUTL, the grandchild of the ESEUTIL database utility designed for Exchange. ESENTUTL has a number of switches for setting and controlling restoration and integrity checks. Ntdsutil presents these options in a menu. The two most commonly used options are as follows:

    • Compacting and reindexing Active Directory

    • Repairing the Active Directory database

    Compacting the Active Directory Database

    If you are an experienced Exchange 5.5 administrator, you know how fragile the old ESE database can be. The new-and-improved ESE engine in Active Directory does not require much attention. Every 12 hours, a garbage collection process runs that removes objects that have been tombstoned longer than 60 days. The garbage collector then defrags and compacts the database. There is no need to perform an offline defrag or a reindex.

    If you perform an offline defrag using Ntdsutil, the utility compacts the database by copying the contents to a new copy of Ntds.dit in a temporary directory of your naming. You then either copy the new file over the old file or point the system at the new directory. The log files are no longer valid and can be ignored.

    The only time you should need to do an offline defrag is when you want to recover disk space using Ntds.dit. The online defrag packs the database but does not release the disk space. To do an offline defrag, follow Procedure 10.10.

    Procedure 10.10 Performing an Offline Defragmentation of Active Directory

    1. Boot the domain controller to DS Repair mode and run Ntdsutil.

    2. At the Ntdsutil: prompt, enter files. This opens the file maintenance prompt.

    3. Enter compact to <directory> where <directory> is the name of the temporary directory to store the compacted Ntds.dit. An example of the result follows:

      file maintenance: compact to c:\ntdstemp
      Opening database [Current].
      Creating dir: c:\ntdstemp
      Using Temporary Path: C:\
      Executing Command: C:\WindowsWindows\system32\esentutl.exe /d
      "e:\Windows\NTDS\ntds.dit" /8
       /o /l"e:\Windows\NTDS" /s"e:\WindowsWindows\NTDS" /t"c:\temp\ntds.dit" /!10240 /p
      
      
      Initiating DEFRAGMENTATION mode...
      Database: e:\WindowsWindows\NTDS\ntds.dit
      Log files: e:\Windows\NTDS
      System files: e:\Windows\NTDS
      Temp. Database: c:\temp\ntds.dit
      
                      Defragmentation Status  ( % complete )
      
                0    10   20   30   40   50   60   70   80   90  100
                |Ч Ч |Ч Ч |Ч Ч |Ч Ч 00|Ч Ч |Ч Ч |Ч Ч |Ч Ч |Ч Ч |Ч Ч|
                ...................................................
      
      Note:
        It is recommended that you immediately perform a full backup
        of this database. If you restore a backup made before the
        defragmentation, the database will be rolled back to the state
        it was in at the time of that backup.
      
      Operation completed successfully in 22.172 seconds.
      Spawned Process Exit code 0x0(0)
      
    4. Copy the new Ntds.dit file to the original NTDS directory. If you want, you can leave the new directory where it is and redirect the Directory pointers:

      Set Path Backup <directory>
      Set path DB <directory>
      Set path logs <directory>
      Set path working dir <directory>
      

      If you normally keep your logs on a different drive, you can leave that pointer alone.

    Repairing the Active Directory Database

    If the ESE engine encounters a problem caused by corrupted pages in the database or a corrupt index file or a combination of the two, you may need to repair the database. Symptoms of this kind of problem are Event log entries, console errors, or the machine might reboot with errors from the Local Security Authority Subsystem (LSASS).

    Active Directory repair has two stages:

    • Soft recovery. This stage rebuilds the database entries using the logs and checkpoint file and then rebuilds the indexes.

    • Hard repair. This stage covers the same ground as the soft recovery but also deletes any corrupted pages. This can cause loss of data, so don't do a hard repair unless you have no other alternative. You should always get a backup of the Directory prior to performing any database repair.

    Both of these stages require that you restart in Directory Services Restore mode. When you're ready, proceed as follows in Procedure 10.11.

    Procedure 10.11 Performing a Soft Recovery of Active Directory

    1. Open a console session.

    2. Run Ntdsutil.

    3. At the prompt, enter files. This opens the file maintenance: prompt.

    4. Enter recover. An example output looks like this:

      Executing Command: C:\Windows\system32\esentutl.exe /r /8 /o /l"e:\Windows\NTDS"
      /s" e:\Windows\NTDS" /!10240Initiating RECOVERY mode...Log files:
      e:\Windows\NTDSSystem files: e:\Windows\NTDS
      
      Performing soft recovery...
      Operation completed successfully in 6.985 seconds.
      Spawned Process Exit code 0x0(0)
      
      If recovery was successful, it is recommended
       you run semantic database analysis to insure
       semantic database consistency as well.
      

    As you can see, this operation proceeds relatively painlessly as long as nothing is wrong with the database. If a problem is discovered, the system will attempt to fix it. You should then perform a Semantic Database Analysis from Ntdsutil to verify and/or repair the internal name links in the database.

    If the results of the soft recovery indicate that a problem persists, you may need to perform a hard repair. Consider contacting Microsoft Product Support Services before proceeding. They may have other suggestions that are not as drastic. When you do need to perform a hard repair, follow Procedure 10.12.

    Procedure 10.12 Performing a Hard Repair of Active Directory

    1. In Ntdsutil, from the file maintenance: prompt, enter repair. An example output looks like this:

      
      Opening database [Current].
      Executing Command: C:\Windows\system32\esentutl.exe /p "e:\Windows\NTDS\ntds.dit" /! 
      graphics/ccc.gif10240 /8 /v /x /o
      
      Initiating REPAIR mode...
      Database: e:\Windows\NTDS\ntds.dit
      Temp. Database: REPAIR.EDB
      got 3910 buffers
      checking database header
      forcing database to consistent state
      
      checking database integrity
      <<result of integrity check deleted for brevity>>
      
      integrity check completed.
      Warning:
      You MUST delete the logfiles for this database
      
      Note:
        It is recommended that you immediately perform a full backup
        of this database. If you restore a backup made before the
        repair, the database will be rolled back to the state
        it was in at the time of that backup.
      
      Operation completed successfully in 4.336 seconds.
      Spawned Process Exit code 0x0(0)
      

      If a problem is encountered during the repair, the error is written to the Repair.txt file in the \WindowsWindows\NTDS directory where the Ntds.dit file resides. You should also check the Event log for any errors.

    2. Perform a full backup of the System State files using the procedure outlined in the "Backing Up the Directory" section earlier in this chapter.

    Moving Active Directory Support Files

    When you promote a domain controller, you select where you want the main Active Directory file, Ntds.dit, and the log files. You can change this location if you decide that you need to improve performance by putting the logs on a different spindle or you want to get the files off the system partition, where they go by default.

    To move the files, you must boot into Active Directory Restore mode. This requires that you know the local Administrator password, also called the Active Directory Restore password. You should always put the files on an NTFS partition to get security and good random access performance. When you are ready to move the files, follow Procedure 10.13.

    Procedure 10.13 Changing Active Directory File Locations

    1. Boot to AD Restore Mode.

    2. Open a console session.

    3. Run Ntdsutil.

    4. Enter files to get to the files maintenance prompt. Enter ? to get an option list:

      file maintenance: ?
      
       ?                             - Show this help information
       Compact to %s                 - Compact DB to specified directory
       Header                        - Dump the Jet database header
       Help                          - Show this help information
       Info                          - Return information about DS files
       Integrity                     - Perform Jet integrity check
       Move DB to %s                 - Move DB to specified directory
       Move logs to %s               - Move log files to specified directory
       Quit                          - Return to the prior menu
       Recover                       - Perform soft database recovery
       Set path backup %s            - Set online backup directory path
       Set path DB %s                - Set DB file path
       Set path logs %s              - Set logging directory path
       Set path working dir %s         - Set NTDS working directory path
      
    5. Use the move db to %s or move logs to %s options to move the database or the logs. Replace %s with the full path name, such as D:\Windows\NTDS.

      Previous Section Next Section