IT tutorials
 
Applications Server
 

Active Directory Lightweight Directory Services : Configuring and Using AD LDS (part 1) - Working with AD LDS Tools, Creating AD LDS Instances

3/1/2013 11:58:10 AM
- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019

Now that you have installed AD LDS, you can begin to work with it to store directory-related data for various applications. The first thing you should do is become familiar with the AD LDS tool set. After you understand which tools you can use to manage AD LDS, you can begin to create your first instances. After you’ve created your instances, you can secure them to ensure that they are properly protected. You can then move on to the creation of replicas for these instances so that you can install them on various other systems and control replication so that instances located on different computers can be updated through multimaster replication.

This lesson illustrates the value that AD LDS offers when you combine it with applications and integrate it with the other Active Directory technologies contained within Windows Server 2008 R2.

After this lesson, you will be able to:

  • Create AD LDS instances.

  • Work with AD LDS tools.

  • Work with application partitions.

  • Manage replication between AD LDS instances.

Estimated lesson time: 30 minutes

1. Working with AD LDS Tools

You can work with AD LDS through a selection of tools, many of which will be familiar to you because they are the same tools you use for AD DS administration. Table 1 describes each of these tools and the purpose they serve in managing the AD LDS service.

Table 1. AD LDS Tools and AD DS Tools

TOOL NAME

USAGE

LOCATION

Active Directory Schema Snap-in

Modify the schema for AD LDS instances. You must use the Regsvr32.exe command to register the Schmmgmt.dll first.

Custom MMC

Active Directory Sites And Services

Configure and manage replication scopes for AD LDS instances. AD LDS instances must be updated to support replication objects first.

Administrative Tools program group

AD LDS Setup

Create AD LDS instances.

Administrative Tools program group

ADAMInstall.exe

Command-line tool for the creation of AD LDS instances.

%SystemRoot%\ADAM folder

ADAMSync.exe

Command-line tool for synchronizing data from AD DS forest to AD LDS instance. AD LDS instance must be updated to AD DS schema first.

%SystemRoot%\ADAM folder

ADAMUninstall.exe

Command-line tool for the removal of AD LDS instances.

%SystemRoot%\ADAM folder

ADSchemaAnalyzer.exe

Command-line tool for copying schema contents from AD DS to AD LDS or from one AD LDS instance to another. Supports third-party LDAP directory schema copies.

%SystemRoot%\ADAM folder

ADSI Edit

Interactively manage AD LDS content through ADSI.

Administrative Tools program group

CSVDE.exe

Import data into AD LDS instances.

Command line

DSACLS.exe

Control access control lists on AD LDS objects.

Command line

DSAMain.exe

Mount Active Directory store (.dit) backups or snapshots to identify their contents.

Command line

DSDBUtil.exe

Perform database maintenance, configure AD LDS ports, and view existing instances. Also, create one-step installations for transporting AD LDS instances through the Install from Media (IFM) generation process.

Command line

Dcdiag.exe

Diagnose AD LDS instances. Must use the /n:NamingContext switch to name the instance to diagnose.

Command line

DSMgmt.exe

Supports application partition and AD LDS policy management.

Command line

Event Viewer

Audit AD LDS changes and log old and new values for both objects and attributes.

Administrative Tools program group

LDAP Data Interchange Format (LDIF) files

AD LDS installations can dynamically import LDIF files (.ldp) during instance creation, automatically configuring the instance.

%SystemRoot%\ADAM folder

LDIFDE.exe

Import data into AD LDS instances.

Command line

LDP.exe

Interactively modify content or AD LDS instances through LDAP.

Command line

Ntdsutil.exe

Manage AD LDS instances, but only if AD DS is also installed. (Not recommended; use DSDBUtil.exe instead.)

Command line

RepAdmin.exe

Analyze replication to view potential issues.

Command line

Server Manager

Manage existing AD LDS instances.

Administrative Tools program group

Windows PowerShell

Create, manage, and delete AD LDS instances.

Administrative Tools program group

Windows Server Backup

Back up or restore AD LDS instances and their contents.

Administrative Tools program group

You’ll use a variety of the tools listed in Table 1 to perform the configuration and administration operations required when you run AD LDS services.

2. Creating AD LDS Instances

The AD LDS role installation process is very similar to the AD DS installation process. You begin by installing the AD LDS binaries, and then, after they are installed, you create AD LDS instances to use the service. In the same way, when you deploy AD DS, you begin by installing the binaries, and then you use the Active Directory Domain Services Installation Wizard to create the AD DS instance you will use. Because of their same roots, many of the tools you use to manage them are the same.

Preparing for AD LDS Instance Creation

You create AD LDS instances by using the Active Directory Lightweight Directory Services Setup Wizard. However, you need to prepare several items before you create the instance. Make note of the values you choose as you prepare each item because you will need these values to create and manage the instance. These items include:

  • A data drive created for your server. Because this server will be hosting directory stores, place these stores on a drive that is separate from the operating system.

  • The name you will use to create the instance. Use meaningful names, such as the name of the application that will be tied to an instance, to identify instances. This name is used to identify the instance on the local computer as well as to name the files that make up the instance and the service that supports it.

  • The ports you intend to use to communicate with the instance. Both AD LDS and AD DS use the same ports for communication. These ports are the default LDAP (389) and LDAP over the Secure Sockets Layer (SSL), or Secure LDAP (636), ports. AD DS uses two additional ports, 3268, which uses LDAP to access the global catalog, and 3269, which uses Secure LDAP to access the global catalog. Because AD DS and AD LDS use the same ports, this is another good reason for not running both roles on the same server. However, when the wizard detects that ports 389 and 636 are already in use, it proposes 50,000 and 50,001 for each port and then uses other ports in the 50,000 range for additional instances.

    Quick Check

    1. Which ports are used to work with AD LDS instances?

    2. How do the ports in an AD LDS instance differ from ports used by AD DS?

    Quick Check Answers

    1. The ports used by an AD LDS instance can be the standard LDAP port, 389, or the LDAP over SSL or Secure LDAP port, 636. In addition, AD LDS can use any port over 1025. However, use ports in the 50,000 range as a best practice.

    2. Both AD DS and AD LDS can use ports 389 (LDAP) or 636 (Secure LDAP). In addition, AD DS uses ports 3268 (LDAP) and 3269 (Secure LDAP) to communicate with the global catalog service. However, reserve ports 389 and 636 for AD DS as a best practice.

    Warning

    IMPORTANT USING PORTS 389 AND 636

    If you are creating AD LDS instances within a domain, do not use ports 389 or 636 even if you are not creating the first instance on a domain controller. AD DS uses these ports by default, and, because of this, some consoles, such as those using the Active Directory Schema snap-in, will not bind to local instances because they bind to the AD DS directory by default. As a best practice, always use ports beyond the 50,000 range for your AD LDS instances.

    Tip

    EXAM TIP

    Make note of the default ports. They are sure to be on the exam, even though you should avoid them in production environments.

  • The Active Directory application partition name that you intend to use for the instance. You must use a distinguished name (DN) to create the partition. For example, you could use CN=AppPartition1,DC=Contoso,DC=com. Depending on how you intend to use the instance, you might or might not need the application partition. Application partitions control the replication scope for a directory store. For example, when you integrate DNS data within the directory, AD DS creates an application partition to make DNS data available to appropriate DCs. Application partitions for AD LDS can be created in one of three ways: when you create the instance, when you install the application that will be tied to the instance, or when you create the partition manually through the LDP.exe tool. If your application will not create application partitions automatically, create them with the wizard.

  • A service account to run the instance. You can use the Network Service account, but if you intend to run multiple instances, it might be best to use named service accounts for each instance. If you choose not to use a managed service account and decide to set up your service accounts manually, remember to follow the service accounts guidelines and requirements as listed here. Create a domain account if you are in a domain; otherwise, use a local account (for example, in a perimeter network).


  • Assign the Generate Security Audits user right in the Local Security Policy of each computer that will host this instance to support account auditing.

  • A group that will contain the user accounts that will administer the instance. The best practice for permission assignments is always to use groups even if only one account is a member of the group. If personnel changes, you can always add or change group members without having to add or change permissions. Create a domain group if you are in a domain; otherwise, create a local group. Name the group the same as the instance. This way, it will be easy to track the group’s purpose. Add your own account to the group as well as to the service account you created earlier.

  • Any additional LDIF files you need for the instance. Place these files in the %SystemRoot%\ADAM folder. These files are imported during the creation of the instance. Importing LDIF files extends the schema of the instance you are creating to support additional operations. For example, to synchronize AD DS with AD LDS, you would import the MS-AdamSyncMetadata.ldf file. If your application requires custom schema modifications, create the LDIF file ahead of time and import it as you create the instance. Note that you can always import LDIF files after the instance is created. Default LDIF files are listed in Table 2.

Table 2. Default AD LDS LDIF Files

FILE NAME

PURPOSE

MS-ADAM-Upgrade-1.ldf

To upgrade the AD LDS schema to the latest version.

MS-ADAM-Upgrade-2.ldf

To upgrade the AD LDS schema to support the AD Recycle Bin.

MS-adamschemaw2k3.ldf

Required as a prerequisite for synchronizing an instance with Active Directory in Windows Server 2003.

MS-adamschemaw2k8.ldf

Required as a prerequisite for synchronizing an instance with Active Directory in Windows Server 2008 R2.

MS-AdamSyncMetadata.ldf

Required to synchronize data between an AD DS forest and an AD LDS instance through ADAMSync.

MS-ADLDS-DisplaySpecifiers.ldf

Required for the Active Directory Sites And Services snap-in operation.

MS-AZMan.ldf

Required to support the Windows Authorization Manager.

MS-InetOrgPerson.ldf

Required to create inetOrgPerson user classes and attributes.

MS-User.ldf

Required to create user classes and attributes.

MS-UserProxy.ldf

Required to create a simple userProxy class.

MS-UserProxyFull.ldf

Required to create a full userProxy class. MS-UserProxy.ldf must be imported first.

After you have all these items in hand, you are ready to create your instance. Make sure the account you use has local administrative rights. You can create instances in one of two ways. The first is through the Active Directory Lightweight Services Setup Wizard, and the second is through the command line. You use the wizard during the practice in this lesson. Using the command line is explained in the next section.

Warning

IMPORTANT AD LDS LOG FILES

AD LDS creates log files during the creation of an instance. These files are located in the %SystemRoot%\Debug folder and are named ADAMSetup.log and ADAMSetup_loader.log. You can review the content of these files to debug instance creation issues.

Performing an Unattended AD LDS Instance Creation

You can also perform unattended AD LDS instance creations. For example, to create instances on Server Core installations, you must use an unattended instance creation process because there is no graphical interface to run the wizard. Unattended instance creations are also useful when you need to create an instance for a distributed application on multiple servers. 

The %SystemRoot%\ADAM folder includes an additional command, AdamInstall.exe, which can be run to perform unattended instance setups. As with the Dcpromo.exe command, this command requires a text file as input for the creation of the instance. You can run AdamInstall.exe on either a full installation or Server Core. Begin by creating an answer file, as follows:

  1. Launch Notepad.

  2. Type the text for the answer file. Include the following items:

    [ADAMInstall]
    InstallType=Unique
    InstanceName=InstanceName
    LocalLDAPPortToListenOn=PortNumber
    LocalSSLPortToListenOn=PortNumber
    NewApplicationPartitionToCreate=PartitionName
    DataFilesPath=D:\ADAMInstances\InstanceName\Data
    LogFilesPath=D:\ADAMInstances\InstanceName\Data
    ServiceAccount=DomainOrMachineName\AccountName
    ServicePassword=Password
    Administrator=DomainOrMachineName\GroupName
    ImportLDIFFiles="LDIFFilename1" "LDIFFilename2" "LDIFFilename3"
    SourceUserName=DomainorMachineName\AccountName
    SourcePassword=Password

    Replace all names in italics with appropriate values. Use caution with this file because it includes passwords, and these passwords are displayed in clear text. The passwords are removed as soon as the file is used by the AD LDS instance creation tool.

  3. Save the file in the %SystemRoot%\ADAM folder, and name it with the name of the instance you want to create.

  4. Close Notepad.


Now you’re ready to create your instance. Remember that you need local administrative rights.

  1. Open an elevated command prompt from the Start menu by right-clicking Command Prompt and clicking Run As Administrator.

  2. In the command prompt window, move to the %SystemRoot%\ADAM folder. Type the following command, and then press Enter.

    cd windows\adam
  3. Type the following command. Use quotation marks for the file name if it includes spaces.

    adaminstall /answer:filename.txt
  4. Close the command prompt window.

Your instance is ready. You can verify that the instance files have been created by going to the target folder and viewing its contents.

Migrating a Previous LDAP Instance to AD LDS

You can also migrate existing LDAP directories to AD LDS or upgrade instances of ADAM to AD LDS. You can do this by importing the contents of the older instances into a new instance of AD LDS.

You can import data either when you create the instance or after the instance is created. Both processes use the same approach because both rely on LDIF files or files with the .ldf extension. If you choose to import data after the instance is created, you must use the LDIFDE.exe command. Remember that you must first export the data from the previous instance and place it in a file in LDIF format before you can import the data.

You can use LDIFDE to export contents from legacy instances. Remember that you need local administrative rights as well as administrative rights to the instance to perform these operations. Also make sure you run the command prompt with elevated credentials. Use the following command syntax:

ldifde -f filename -s servername:portnumber -b username domainname password

where filename is the name of the file to create (use quotation marks if the path includes spaces); servername is the name of the server hosting the instance; portnumber is the communications port; and username, domainname, and password are the credentials of an instance administrator.

Use a similar command to import the data into the new instance:

ldifde -i -f filename -s servername:portnumber -b username domainname password

Note that to import passwords from the legacy instance, you must use the –h switch. This switch encrypts all passwords, using Simple Authentication And Security Layer (SASL).

Enabling the AD Recycle Bin in AD LDS

By default, the AD Recycle Bin is not enabled in AD LDS instances just as it is not available in AD DS until it is enabled. Enabling the Recycle Bin in AD LDS requires a schema update. Use the following command to update the schema:

ldifde -i -f MS-ADAM-Upgrade-2.kdf -s servername:portnumber -b username
   domainname password -j . -$ adamschema.cat

This action is irreversible and cannot be undone. Note that it is easiest to perform this update after Windows Server 2008 R2 is installed and the AD LDS role is enabled, because the required LDF and CAT files are easy to locate (in the %SystemRoot%\ADAM folder). If you try to update an AD LDS instance before updating the server to Windows Server 2008 R2, you must locate these files on another server and copy them to the server where you are performing the update.

Quick Check

  1. What are the three ways to create application partitions for AD LDS instances?

  2. What is the purpose of the LDIF files included with AD LDS?

  3. How can you debug an AD LDS instance creation process that goes awry?

Quick Check Answers

  1. You can create application partitions for AD LDS instances in three ways:

    • During the creation of an instance with AD LDS Setup

    • Through the installation of the application that will be tied to an AD LDS instance

    • Manually through the LDP.exe tool

  2. The LDIF files included with AD LDS serve several purposes, depending on the actual file, but generally they are used to extend the schema of an instance to support specific functionality.

  3. AD LDS creates log files during the creation of the instance. These files are located in the %SystemRoot%\Debug folder and are named ADAMSetup.log and ADAMSetup_loader.log. You can review them to find and resolve issues during the creation of the instance.

 
Others
 
- Active Directory Lightweight Directory Services : Understanding and Installing AD LDS
- Microsoft Lync Server 2010 : Using Reverse Proxies with Lync Server (part 2) - Configuring TMG to Support Lync Server
- Microsoft Lync Server 2010 : Using Reverse Proxies with Lync Server (part 1) - Configuring ISA 2006 SP1 to Support Lync Server
- Microsoft Dynamics Ax 2009 : Programming Enterprise Portal Controls (part 4) - ViewState, Page Life Cycle, Proxy Classes
- Microsoft Dynamics Ax 2009 : Programming Enterprise Portal Controls (part 3) - Labels, Formatting, Error Handling
- Microsoft Dynamics Ax 2009 : Programming Enterprise Portal Controls (part 2) - Data, Metadata
- Microsoft Dynamics Ax 2009 : Programming Enterprise Portal Controls (part 1) - AJAX, Session, Context
- Microsoft Dynamics GP 2010 : Speeding up month-end processing with Reconcile to GL functionality
- Microsoft Dynamics GP 2010 : Getting control of printing with Named Printers
- Microsoft Dynamics GP 2010 : Speeding up entry by Copying a Purchase Order
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Technology FAQ
- Is possible to just to use a wireless router to extend wireless access to wireless access points?
- Ruby - Insert Struct to MySql
- how to find my Symantec pcAnywhere serial number
- About direct X / Open GL issue
- How to determine eclipse version?
- What SAN cert Exchange 2010 for UM, OA?
- How do I populate a SQL Express table from Excel file?
- code for express check out with Paypal.
- Problem with Templated User Control
- ShellExecute SW_HIDE
programming4us programming4us