IBM Directory Server Version 4.1: Administration Guide

IBM Directory Server Version 4.1: Administration Guide

Note

Before using this information and the product it supports, read the general information under Appendix D, Notices.

First Edition (April 2002)

This edition applies to version 4, release 1, of the IBM(R) Directory Server and to all subsequent releases and modifications until otherwise indicated in new editions.

(C) Copyright International Business Machines Corporation 2002. All rights reserved.
U.S. Government Users Restricted Rights -- Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.


Preface

This document contains the information that you need to administer the IBM Directory Server.


Contents

  • Preface

  • Directory overview

  • Defining a directory
  • Directory clients and servers
  • Directory security
  • The IBM Directory

  • Server Administration

  • Server Administration graphical user interface
  • Starting Server Administration
  • Distinguished names (DNs)
  • Distinguished Name Syntax
  • DN escaping rules
  • Pseudo DNs
  • Enhanced DN Processing
  • Basic Server Tasks
  • Creating an administrator distinguished name and password
  • Password encryption
  • Using Server Administration
  • Understanding suffixes
  • Creating or adding suffixes
  • Removing a suffix
  • Checking server status
  • Using Server Administration:
  • Using the command line - required for the Linux and HP-UX operating systems:
  • Extended controls for search
  • Sorted Search Control
  • Simple Paged Results
  • Setting Performance
  • Using Server Administration:
  • Using the command line - required for the Linux and HP-UX operating systems:
  • Starting and stopping the server
  • Using Server Administration:
  • Using the command line - required for the Linux and HP-UX operating systems:
  • Understanding Databases
  • Working with DB2 databases
  • Updating settings
  • Importing database entries
  • Backing up a database
  • Restoring a database
  • Exporting database entries
  • Optimizing a database
  • UTF-8 support
  • Configuring the directory to use a database
  • Replication
  • Adding replicas
  • Using Server Administration:
  • Using the command line - required for the Linux and HP-UX operating systems:
  • Replica synchronization
  • Resynchronizing replicas
  • Cleaning change tables
  • Configuring replicas
  • Using Server Administration:
  • Using the command line - required for the Linux and HP-UX operating systems:
  • Populating the directory for a replica using the DB2 backup and restore
  • Listing replicas
  • Using Server Administration:
  • Using the command line - required for the Linux and HP-UX operating systems:
  • Editing replicas
  • Using Server Administration:
  • Using the command line - required for the Linux and HP-UX operating systems:
  • Removing replicas
  • Using Server Administration:
  • Using the command line - required for the Linux and HP-UX operating systems:
  • Using peer-to-peer replication
  • Configuring
  • Example
  • Updates
  • Access control
  • Peer-to-peer attributes
  • Referrals
  • Using the referral object class and the ref attribute
  • Creating entries
  • Associating servers with referrals
  • Pointing to other servers
  • Defining the default referral
  • Binding with a distributed namespace
  • An example of distributing the namespace through referrals
  • Logging Utilities
  • Working with a change log
  • Change log configuration
  • Logging schema changes
  • Multiple database configuration
  • Change log access control
  • Change log expiration of entries
  • Change log schema
  • Working with Administration Utilities
  • Unconfiguring changelog
  • Audit Logging
  • Enabling the audit log
  • Disabling the audit log
  • Viewing the audit log
  • Enabling error logging
  • Viewing the error log
  • Using Server Administration:
  • Using the command line - required for the Linux and HP-UX operating systems:
  • Event notification
  • Enabling event notification
  • Disabling event notification
  • Transaction Support
  • Enabling transaction support
  • Disabling transaction support
  • Command line utilities
  • Client utilities
  • LDAPMODIFY, LDAPADD
  • LDAPDELETE
  • LDAPMODRDN
  • LDAPSEARCH
  • Server utilities
  • Ldif utility
  • Ldif2db utility
  • Bulkload utility
  • Db2ldif utility
  • Directory schema
  • Common schema support
  • The subschema entries
  • The IBMsubschema object class
  • The IBMAttributeTypes attribute type
  • Schema file attribute types
  • Schema queries
  • Dynamic schema changes
  • Disallowed schema changes
  • Schema checking
  • Checking an entry against the schema
  • Access controls
  • Replication
  • iPlanet compatibility
  • Dynamic schema
  • Subclassing
  • DEN schema support
  • Generalized and UTC time
  • Secure Sockets Layer
  • Securing your Server with SSL
  • Using the command line - required for the Linux and HP-UX operating systems:
  • Configuring SSL for LDAP
  • Server Certificate from an External Certificate Authority (CA)
  • Using a Self-Signed Server Certificate
  • Setting up Your LDAP Client to Access IBM Directory
  • Configuring Server Encryption Ciphers
  • Migrate the Key ring file to Key database file
  • Client Authentication
  • Using Server Administration:
  • Using the command line - required for the Linux and HP-UX operating systems:
  • Kerberos
  • Using Kerberos authentication
  • Using Server Administration:
  • Using the command line:
  • Identity mapping for Kerberos

  • Directory Management

  • IBM Directory Management Tool
  • Starting and configuring
  • Starting the Directory Management Tool
  • Configuring the Directory Management Tool
  • Working with servers
  • Connecting to a server
  • Viewing server status
  • Viewing server properties
  • Adding a server
  • Deleting a server
  • Starting server administration from the Directory Management Tool
  • Using the toolbar
  • Browsing the tree
  • Access Control Lists
  • The Access Control Attribute Syntax
  • AclEntry
  • Subject
  • Pseudo DN
  • Rights
  • EntryOwner
  • Propagation
  • Access Evaluation
  • Defining the ACIs and Entry Owners
  • Modifying the ACI and Entry Owner Values
  • Deleting the ACI/Entry Owner Values
  • Retrieving the ACI/Entry Owner Values
  • Working with Access Control Lists
  • Groups and roles
  • Groups
  • Static groups
  • Dynamic groups
  • Nested groups
  • Hybrid groups
  • Determining group membership
  • Group object classes
  • Group attribute types
  • Roles
  • Working with attributes
  • Adding an attribute
  • Using the Directory Management Tool:
  • Using the command line - required the HP-UX operating system:
  • Editing an attribute
  • Using the Directory Mangement Tool:
  • Using the command line - required the HP-UX operating system:
  • Deleting an attribute
  • Using the Directory Management Tool:
  • Using the command line - required the HP-UX operating system:
  • Binary attributes
  • Working with object classes
  • Adding an object class
  • Editing an object class
  • Deleting an object class
  • Viewing the Directrory Management Tool log file

  • Working with directory entries
  • Searching the directory tree for entries
  • Simple search
  • Advanced search
  • Editing a saved search
  • Deleting a saved search
  • Adding an LDAP entry
  • Adding an auxiliary object class
  • Editing an LDAP entry
  • Changing group membership
  • Troubleshooting
  • Debugging
  • Debug output for configuration
  • slapd command parameters
  • Server Debug Mode

  • Appendixes

  • Appendix A. Indexing rules
  • Indexing Rules Specifications for Attributes:
  • Appendix B. Using gsk5ikm
  • Creating a key pair and requesting a certificate from a Certificate Authority
  • Receiving a certificate into a key database
  • Changing a key database password
  • Showing Information about a Key
  • Deleting a Key
  • Making a key the default key in the key ring
  • Creating a key pair and certificate request for self-signing
  • Exporting a key
  • Importing a key
  • Designating a key as a trusted root
  • Removing a key as a trusted root
  • Requesting a certificate for an existing key
  • Migrating a keyring file to the key database format
  • Appendix C. LDAP data interchange format (LDIF)
  • LDIF example
  • Version 1 LDIF support
  • Version 1 LDIF examples
  • IANA Character Sets Supported by Platform
  • Appendix D. Notices
  • Trademarks
  • Glossary

  • Index

  • Directory overview


    Defining a directory

    A directory is a collection of information about objects arranged in some order that gives details about each object. It is a specialized database, that stores typed and ordered information about objects. Directories enable users or applications to find resources that have the characteristics needed for a particular task.

    If the name of an object is known, its characteristics can be retrieved. If the name of a particular individual object is not known, the directory can be searched for a list of objects that meet a certain requirement. Directories can usually be searched by specific criteria, not just by a predefined set of categories.

    A directory is a specialized database that has characteristics that set it apart from general purpose relational databases. A characteristic of a directory is that it is accessed (read or searched) much more often than it is updated (written). Because directories must be able to support high volumes of read requests, they are typically optimized for read access. Because directories are not intended to provide as many functions as general-purpose databases, they can be optimized to economically provide more applications with rapid access to directory data in large distributed environments.

    A directory can be centralized or distributed. If a directory is centralized, there is one directory server (or a server cluster) at one location that provides access to the directory. If the directory is distributed, there are more that one server, usually geographically dispersed, that provide access to the directory.

    When a directory is distributed, the information stored in the directory can be partitioned or replicated. When information is partitioned, each directory server stores a unique and non-overlapping subset of the information. That is, each directory entry is stored by one and only one server. The technique to partition the directory is to use LDAP referrals. LDAP referrals allow the users to refer Lightweight Directory Access Protocol (LDAP) requests to either the same or different name spaces stored in a different (or same) server. When information is replicated, the same directory entry is stored by more than one server. In a distributed directory, some information may be partitioned, and some information may be replicated.


    Directory clients and servers

    Directories are usually accessed using the client-server model of communication. The client and server processes might or might not be on the same machine. A server is capable of serving many clients. An application that wants to read or write information in a directory does not access the directory directly. Instead, it calls a function or application programming interface (API) that causes a message to be sent to another process. This second process accesses the information in the directory on behalf of the requesting application. The results of the read or write are then returned to the requesting application.

    An API defines the programming interface a particular programming language uses to access a service. The format and contents of the messages exchanged between client and server must adhere to an agreed upon protocol. LDAP defines a message protocol used by directory clients and directory servers. There is also an associated LDAP API for the C language and ways to access the directory from a Java(TM) application using the Java Naming and Directory Interface (JNDI).


    Directory security

    A directory should support the basic capabilities needed to implement a security policy. The directory might not directly provide the underlying security capabilities, but it might be integrated with a trusted network security service that provides the basic security services. First, a method is needed to authenticate users. Authentication verifies that users are who they say they are. A user name and password is a basic authentication scheme. Once users are authenticated, it must be determined if they have the authorization or permission to perform the requested operation on the specific object.

    Authorization is often based on access control lists (ACLs). An ACL is a list of authorizations that may be attached to objects and attributes in the directory. An ACL lists what type of access each user or a group of users is allowed or denied. In order to make ACLs shorter and more manageable, users with the same access rights are often put into groups.


    The IBM Directory

    The IBM Directory implements the Internet Engineering Task Force (IETF) LDAP V3 specifications. It also includes enhancements added by IBM in functional and performance areas. This version uses the IBM DB2(R) as the backing store to provide per LDAP operation transaction integrity, high performance operations, and on-line backup and restore capability. It interoperates with the IETF LDAP V3 based clients. Major features include:


    Server Administration


    Server Administration graphical user interface

    The preferred method of administering the server is by using the Server Administration GUI. Because the Linux and HP-UX operating systems do not support Server Administration, if you are using either of those operating systems, you must use the command line alternatives that are provided for the various tasks.


    Starting Server Administration

    If you have previously set the administrator Distinguished Name (DN) and password, and configured a Web server, you can start the Server Administration GUI from a Web browser.

    1. Open a Web browser.
    2. Connect to http://hostname/ldap.
    3. Log on as the administrator DN, enter the password and click Logon.
    Note:
    Some Web servers might require you to specify index.html in the Web address. If you are unable to get to the Server Administration tool with http://hostname:portnumber/ldap, try http://hostname:portnumber/ldap/index.html.

    After the tool has been started, the application window has three parts:

    Navigation area
    The navigation area displays expandable categories for various server content tasks.

    Work area
    The work area displays the tasks associated with the selected task in the navigation area. For example, if Browse tree is selected in the navigation area, the work area displays the directory tree and a toolbar containing tasks related to working with directory entries.

    Status area
    The status area, located at the top of the work area, contains the title of the selected task, system messages, and a link to the help.

    Distinguished names (DNs)

    Every entry in the directory has a distinguished name (DN). The DN is the name that uniquely identifies an entry in the directory. A DN is made up of attribute:value pairs, separated by commas, for example:

    cn=Ben Gray,ou=editing,o=New York Times,c=US
    cn=Lucille White,ou=editing,o=New York Times,c=US
    cn=Tom Brown,ou=reporting,o=New York Times,c=US
    

    Any of the attributes defined in the directory schema may be used to make up a DN. The order of the component attribute value pairs is important. The DN contains one component for each level of the directory hierarchy from the root down to the level where the entry resides. LDAP DNs begin with the most specific attribute (usually some sort of name), and continue with progressively broader attributes, often ending with a country attribute. The first component of the DN is referred to as the Relative Distinguished Name (RDN). It identifies an entry distinctly from any other entries that have the same parent. In the examples above, the RDN "cn=Ben Gray" separates the first entry from the second entry, (with RDN "cn=Lucille White"). These two example DNs are otherwise equivalent. The attribute:value pair making up the RDN for an entry must also be present in the entry. (This is not true of the other components of the DN.)

    Follow this example to create a distinguished name in the slapd32.conf file:

    DN: cn=Directory cn=RDBM Backends cn=IBM SecureWay cn=Schemas cn=Configuration
    ibm-slapdDbName: <databasename>
    ibm-slapdUserID: <username> 
    ibm-slapdDbUserPW: <password>
    ibm-slapdDbInstance: <username>
    

    Distinguished Name Syntax

    The Distinguished Name (DN) syntax supported by this server is based on RFC 2253. The Backus Naur Form (BNF) syntax is defined as follows:

    <name> ::= <name-component> ( <spaced-separator> )
              | <name-component> <spaced-separator> <name>
     
       <spaced-separator> ::= <optional-space>
                       <separator>
                       <optional-space>
     
       <separator> ::=  "," | ";"
     
       <optional-space> ::= ( <CR> ) *( " " )
     
       <name-component> ::= <attribute>
               | <attribute> <optional-space> "+"
                 <optional-space> <name-component>
     
       <attribute> ::= <string>
               | <key> <optional-space> "=" <optional-space> <string>
     
       <key> ::= 1*( <keychar> ) | "OID." <oid> | "oid." <oid>
       <keychar> ::= letters, numbers, and space
     
       <oid> ::= <digitstring> | <digitstring> "." <oid>
       <digitstring> ::= 1*<digit>
       <digit> ::= digits 0-9
     
       <string> ::= *( <stringchar> | <pair> )
                | '"' *( <stringchar> | <special> | <pair> ) '"'
                | "#" <hex>
     
     
       <special> ::= "," | "=" | <CR> | "+" | "<" |  ">"
                | "#" | ";"
     
       <pair> ::= "\" ( <special> | "\" | '"')
       <stringchar> ::= any character except <special> or "\" or '"'
     
     
       <hex> ::= 2*<hexchar>
       <hexchar> ::= 0-9, a-f, A-F
    

    A semicolon (;) character can be used to separate RDNs in a distinguished name, although the comma (,) character is the typical notation.

    White-space characters (spaces) might be present on either side of the comma or semicolon. The white-space characters are ignored, and the semicolon is replaced with a comma.

    In addition, space (' ' ASCII 32) characters may be present either before or after a '+' or '='. These space characters are ignored when parsing.

    A value may be surrounded by double quotation ('"' ACSII 34) characters, which are not part of the value. Inside the quoted value, the following characters can occur without any escaping:

    Alternatively, a single character to be escaped may be prefixed by a backslash ('\' ASCII 92). This method can be used to escape any of the characters listed previously and the double quotation marks ('"' ASCII 34) character.

    This notation is designed to be convenient for common forms of names. Following are further examples of distinguished names written using this notation. First is a name containing three components. The first of the components is a multivalued RDN. A multivalued RDN contains more than one attribute:value pair and can be used to distinctly identify a specific entry in cases where a simple CN value might be ambiguous:

    OU=Sales+CN=J. Smith,O=Widget Inc.,C=US
    

    DN escaping rules

    A DN can contain special characters. These characters are , (comma), = (equals), + (plus), < (less than), > (greater than), # (number sign), ; (semicolon), \ (backslash), and "" (quotation marks).

    To escape these special characters or other characters in an attribute value in a DN string, use the following methods:

    1. If a character to be escaped is one of special characters, precede it by a backslash ('\' ASCII 92). This example shows a method of escaping a comma in an organization name:
      CN=L. Eagle,O=Sue\, Grabbit and Runn,C=GB
      

      This is the preferred method.

    2. Otherwise replace the character to be escaped by a backslash and two hex digits, which form a single byte in the code of the character. The code of the character must be in UTF-8 code set.
    3. Surround the entire attribute value by "" (quotation marks) (ASCII 34), that are not part of the value. Between the quotation character pair, all characters are taken as is, except for the \ (backslash). The \ (backslash) can be used to escape a backslash (ASCII 92) or quotation marks (ASCII 34), any of the special characters previously mentioned, or hex pairs as in method 2. For example, to escape the quotation marks in cn=xyz"qrs"abc, it becomes cn=xyz\"qrs\"abc or to escape a \:
      "you need to escape a single backslash this way \\" 
       
      

      Another example, "\Zoo" is illegal, because 'Z' cannot be escaped in this context.

    On the server end, when a DN is received in this form, the server reformats the DN using escape mechanisms number 1 and 2 for internal processing.


    Pseudo DNs

    Pseudo DNs are used in access control definition and evaluation. The LDAP/DB2 directory contains several pseudo DNs (for example, "group:cn=this" and "access-id:cn=Anybody"), which are used to refer to large numbers of DNs that share a common characteristic, in relation to either the operation being performed or the object on which the operation is being performed.

    Three pseudo DNs are supported by LDAP version 3:

    Some examples of pseudo DNs:

    Example 1
    Consider the following ACL for object: cn=personA, c=US AclEntry:
    access-id: cn = this:critical:rwsc  
    AclEntry: group: cn=Anybody: normal:rsc  
    AclEntry: group: cn=Authenticated: sensitive:rcs
    

    Consider the following ACL for object: cn=personA, c=US AclEntry: access-id: cn = this:critical:rwsc AclEntry: group: cn=Anybody: normal:rsc AclEntry: group: cn=Authenticated: sensitive:rcs

    Table 1.

    User Binding as Would receive
    cn=personA, c=US normal:rsc:sensitive:rcs:critical:rwsc
    cn=personB, c=US normal:rsc:sensitive:rsc
    NULL (unauth.) normal:rsc

    In this example, personA receives permissions granted to the "cn=this" ID, and permissions given to both the "cn=Anybody" and "cn=Authenticated" pseudo DN groups.

    Example 2
    Consider the following ACL for object: cn=personA, c=US AclEntry: access-id:cn=personA, c=US: object:ad
    AclEntry: access-id: cn = this:critical:rwsc  
    AclEntry: group: cn=Anybody: normal:rsc  
    AclEntry: group: cn=Authenticated: sensitive:rcs
    

    For an operation performed on cn=personA, c=US:

    Table 2.

    User Binding as Would receive
    cn=personA, c=US object:ad:critical:rwsc
    cn=personB, c=US normal:rsc:sensitive:rsc
    NULL (unauth.) normal:rsc

    In this example, personA receives permissions granted to the "cn=this" ID, and those given to the DN itself "cn=personA, c=US". Note that the group permissions are not given because there is a more specific aclentry ("access-id:cn=personA, c=US") for the bind DN ("cn=personA, c=US").


    Enhanced DN Processing

    A composite RDN of a DN may consist of multiple components connected by the '+' operators. The server enhances the support for searches on entries that have such a DN. A composite RDN can be specified in any order as the base for a search operation.


    Basic Server Tasks

    The following tasks can be performed by the directory administrator:


    Creating an administrator distinguished name and password

    The administrator name and password is usually set during the server configuration process. However, you can create an administrator name and an administrator password by using either the ldapcfg command or the ldapxcfg utility.

    Using the ldapcfg command:

    ldapcfg -u <admindn> -p <adminpassword>
     
    

    To use the ldapxcfg utility type ldapxcfg on a command line. When the utility panel is displayed check Set the directory administrator name and password and follow the directions. See the Installation and Configuration Guide for additional information on using the ldapxcfg utility.

    See Distinguished names (DNs) for more information about distinguished names.


    Password encryption

    IBM Directory allows you to prevent unauthorized access to user passwords. User passwords may be encoded and stored in the directory, which prevents clear passwords from being accessed by any users including the system administrators.

    The administrator may configure the server to encode userPassword attribute values in either a one-way encoding format or a two-way encoding format.

    One-way encoding formats:

    After the server is configured and re-started, any new passwords (for new users) or modified passwords (for existing users) are encoded before they are stored in the directory database. The encoded passwords are tagged with the encoding algorithm name so that passwords encoded in different formats can coexist in the directory. When the encoding configuration is changed, existing encoded passwords remain unchanged and continue to work.

    For applications which require retrieval of clear passwords, such as middle-tier authentication agents, the directory administrator needs to configure the server to perform either a two-way encoding or no encryption on user passwords. In this instance, the clear passwords stored in the directory are protected by the directory ACL mechanism.

    Two-way encoding format:

    imask, a 2-way masking option, is provided to allow values of the userPassword attribute to be encoded in the directory and retrieved as part of an entry in the original clear format. Some applications such as middle-tier authentication servers require passwords to be retrieved in clear, however, corporate security policies might prohibit storing clear passwords in a secondary permanent storage. This option satisfies both requirements.

    A simple bind will succeed if the password provided in the bind request matches with any of the multiple values of the userPassword attribute.

    When you configure the server using Server Administration, you can select one of the following four encryption options:

    None
    No encryption. Passwords are stored in the clear text format.

    crypt
    Passwords are encoded by the UNIX(R) crypt encoding algorithm before they are stored in the directory.

    SHA-1
    Passwords are encoded by the SHA-1 encoding algorithm before they are stored in the directory.

    imask
    Passwords are encoded by the imask algorithm before they are stored in the directory,and are retrieved as part of an entry in the original clear format.

    The default option is imask. After a configuration change, the directory server must be re-started to activate the change. The change is registered in a password encryption directive of the server configuration file:

    ibm-SlapdPwEncryption: imask
    

    The server configuration file is located in:

    <installation path>\etc\slapd32.conf 
    

    It is also possible (but not recommended) to modify the configuration file using an editor.

    In addition to userPassword, values of the secretKey attribute are always "imask" encoded in the directory. Unlike userPassword, this encoding is enforced for values of secretKey. No other option is provided. The secretKey attribute is an IBM defined schema. Applications may use this attribute to store sensitive data that need to be always encoded in the directory and retrieve the data in clear via the directory access control.

    Consult the Installation and Configuration Guide for additional information about the configuration file.

    Notes:

    1. When 'imask' is used as the server password encryption method, only the first 46 characters of a password entered are effective. Any characters after the 46th character will be ignored and considered as matched. Similarly, if the UNIX 'crypt' method is used, only the first 8 characters will be effective. Also since the value of SecretKey is encrypted in the database using the 'imask' encryption, the SecretKey values which are longer than 46 characters will not be maintained.

    2. A one-way encoded password can be used for password matching but it cannot be decrypted. During user login the login password is encoded and compared with the stored version for matching verification.

    Using Server Administration

    1. If you have not done so already, click the arrow to the left of Settings in the navigation area, then click General.
    2. Enter the number of the unsecure port you wish to use. The Unsecure port can range from 0 to 65535. The default unsecure port is 389.
    3. The Version displays as a link. Click the link if you want to display additional information about the installed version of this software.
    4. Select a type of Password encryption.
    5. Click Update.
    6. A message displays when the update is complete. You must restart the server using the Restart icon in the upper right corner for the changes to take effect.

    Understanding suffixes

    A suffix is a DN that identifies the top entry in a locally held directory hierarchy. Because of the relative naming scheme used in LDAP, this DN is also the suffix of every other entry within that directory hierarchy. A directory server can have multiple suffixes, each identifying a locally held directory hierarchy, for example, o=ibm,c=us.

    Note:
    The specific entry that matches the suffix must be added to the directory.

    Entries to be added to the directory must have a suffix that matches the DN value, such as 'ou=Marketing,o=ibm,c=us'. If a query contains a suffix that does not match any suffix configured for the local database, the query is referred to the LDAP server that is identified by the default referral. If no LDAP default referral is specified, an Object does not exist result is returned.

    Creating or adding suffixes

    To create or add a suffix use one of the following methods.

    Using Server Administration:

    If you have not done so already, click the arrow to the left of Settings in the navigation area.

    1. Click Suffixes.
    2. Enter the Suffix DN, for example, c=Italy.
    3. Click Update.
    4. You must restart the server using the Restart icon in the upper right corner for the changes to take effect.

    Using the command line - required for the Linux and HP-UX operating systems:

    To create a suffix, add the following line ibm-slapdSuffix: <suffixname> to the slapd32.conf file stanza:

    DN: cn=Directory cn=RDBM Backends cn=IBM SecureWay cn=Schemas cn=Configuration
    ibm-slapdDbName: <databasename>
    ibm-slapdUserID: <username>
    ibm-slapdDbUserPW: <password>
    ibm-slapdDbInstance: <username>
    ibm-slapdSuffix: <suffixname>
    

    You must restart the server for the change to take effect.

    Removing a suffix

    To remove a suffix use one of the following methods:

    Using Server Administration:

    If you have not done so already, click the arrow to the left of Settings in the navigation area.

    1. Click Suffixes.
    2. Select the checkbox for the suffix you want to remove.
    3. Click Update.
    4. You must restart the server using the Restart icon in the upper right corner for the changes to take effect.

    Using the command line - required for the Linux and HP-UX operating systems:

    To delete a suffix, remove the line from the slapd32.conf file. For example, the following line ibm-slapdSuffix: <suffixname> to the slapd32.conf file stanza:

    DN: cn=Directory cn=RDBM Backends cn=IBM SecureWay cn=Schemas cn=Configuration
    ibm-slapdDbName: <databasename>
    ibm-slapdUserID: <username>
    ibm-slapdDbUserPW: <password>
    ibm-slapdDbInstance: <username>
    ibm-slapdSuffix: <suffixname>
    

    You must restart the server for the change to take effect.

    Note:
    To modify a suffix, edit the line in the slapd32.conf file.

    Checking server status

    To verify current condition of the server use one of the following methods:

    Using Server Administration:

    If you have not done so already, click the arrow to the left of Current state in the navigation area, then click Server status. If the server is running, the following information is displayed:

    Server status
    The server is either Running or Stopped.

    Start time
    The time the server was started. The start time is in the format:
    day month date hour:minutes:seconds timezone year
    

    Current time
    The current time on the server. The current time is in the format:
    day month date hour:minutes:seconds timezone year
    

    Total threads
    The number of threads being used.

    Total threads blocked on write
    The number of threads sending data back to the client.

    Number of connections
    The number of active connections.

    Total connections
    The total number of connections.

    Number of operations initiated
    The number of initiated requests.

    Number of operations completed
    The number of completed requests.

    Number of entries sent
    The number of entries sent by the server.

    Using the command line - required for the Linux and HP-UX operating systems:

    ldapsearch -h <servername> -p <portnumber> -b cn=monitor -s base objectclass=*
    

    Extended controls for search

    The search function searches for a filter match on only the first 240 bytes of an attribute if indexing is enabled for that attribute. Additionally, if sort is specified on a search request, the server sorts the entries found by the search using only the first 240 bytes. Any end user or client application need to take into consideration that a match for a search filter that exists in a value after the first 240 bytes might not be returned to the client depending on whether indexing is enabled for that table.

    Note:
    This restriction is specific to the IBM Directory Server. IBM LDAP servers on other platforms, including z/OS(TM) and OS/400(R) might have different restrictions. Consult the documentation for each platform to determine restrictions.

    The administrator can tell if indexing has been enabled for an attribute by looking at the attribute definition in the Directory Management Tool, or by looking at the attribute definition returned by a search of cn=schema. When viewing an attribute definition in the Directory Management Tool, the ibm attributes fields includes one of the following index keywords: APPROX, EQUALITY, ORDERING, or SUBSTR. If the ldapsearch utility is used, the ibmattributetypes value contains the same keywords. For example, the 'cn' attribute has all indexes defined:

    attributetypes=( 2.5.4.3 NAME ( 'cn' 'commonName' ) DESC 'This is the X.500 
                    commonName attribute, which contains a name of an object.  
                    If the object corresponds to a person, it is typically the 
                    persons full name.' SUP 2.5.4.41 EQUALITY 2.5.13.2 
                    ORDERING 2.5.13.3 SUBSTR 2.5.13.4 )
    ibmattributetypes=( 2.5.4.3 DBNAME ( 'cn' 'cn' ) ACCESS-CLASS NORMAL LENGTH 
                       256 EQUALITY ORDERING SUBSTR APPROX )
    

    Sorted Search Control

    Sorted Search Results provides sort capabilities for LDAP clients that have limited or no sort functionality. Sorted Search Results allows an LDAP client to receive search results sorted based on a list of criteria, where each criteria represents a sort key. The sort criteria includes attribute types, matching rules, and descending order. The server uses this criteria to sort search results before returning them. This moves the responsibility of sorting from the client application to the server, where it might be done much more efficiently. For example, a client application might want to sort the list of employees at their Grand Cayman site by surname, common name, and telephone number. Instead of building the search list twice so it can be sorted (once at the server and then again at the client after all the results are returned), the search list is built only once, and then sorted, before returning the results to the client application.

    The server sorts search entries based on attributes and by default allows a maximum of three sort keys (attribute names) per search operation. To change the value of this administrative limit, change the following line, ibm-slapdSortKeyLimit: 3, in the slapd32.conf file. If the line does not exist, add it to set the new maximum (if the line does not exist, the server is using the default value). Additionally, because sorting search results before returning them uses more server resources than simply returning them, by default only requests from users binding with Administrator authority are honored by the server. If you would like the server to honor requests from all others, including those binding anonymously, you can configure the server to do so. To honor sorted search requests submitted using non-Administrator bind, change the following line, ibm-slapdSortSrchAllowNonAdmin: FALSE, in the slapd32.conf file. If the line does not exist, add it with a value of TRUE to allow non-Administrator bind.

    dn: cn=Configuration
    cn: Configuration
    ibm-slapdAdminDn: <adminname>
    ibm-slapdAdminPW: <password>
    ibm-slapdErrorLog: <errorlogfile>
    ibm-slapdPort: <poprtnumber>
    ibm-slapdSizeLimit: <sizelimit>
    ibm-slapdTimeLimit: <timelimit>
    ibm-slapdSortSrchAllowNonAdmin: TRUE
    ibm-slapdSortKeyLimit: 3
    

    You must restart the server for any changes to take effect.

    The LDAP server returns all referrals to the client at the end of a search request, the same as is done today. It is up to the application using the client services to decide whether to set the criticality of the sorted search request, and to handle a lack of support of those controls on referral servers as appropriate based on the application. Additionally, the LDAP server does not ensure that the referral server supports the sorted search control. Multiple lists could be returned to the client application, some not sorted. It is the client application's decision as to how to best present this information to the end user. Possible solutions include: combine all referral results before presenting to the end user; show multiple lists and the corresponding referral server host name; take no extra steps and show all results to the end user as they are returned from the server. The client application must turn off referrals to get one truly sorted list, otherwise when chasing referrals with sorted search controls specified, unpredictable results might occur.

    It is important to note when taking advantage of the server sorted search results that:

    More information about the server side sorted search control can be found in RFC 2891. The control OID for sorted search results is 1.2.840.113556.1.4.473, and is included in the RootDSE information as a supported control.

    Simple Paged Results

    Simple Paged Results provides paging capabilities for LDAP clients that want to receive just a subset of search results (page) instead of the entire list. The next page of entries is returned to the client application for each subsequent paged results search request submitted by the client until the operation is canceled or the last result is returned. The server ignores a simple paged results request if the page size is greater than or equal to the sizeLimit value for the server because the request can be satisfied in a single operation.

    Because paging of search results holds server resources throughout the life of the simple paged results request, there are several new administrative limits employed to ensure that server resources cannot be abused, or misused, through the use of simple paged results search requests.

    ibm-slapdPagedResAllowNonAdmin
    By default only requests from users binding with Administrator authority is honored by the server. If you would like the server to honor requests from all others, including those binding anonymously, you can configure the server to do so. To honor simple paged results search requests submitted using non-Administrator bind, change the following line, ibm-slapdPagedResAllowNonAdmin: FALSE, in the slapd32.conf file. If the line does not exist, add it with a value of TRUE to allow non-Administrator bind.
    dn: cn=Configuration
    cn: Configuration
    ibm-slapdAdminDn: <adminname>
    ibm-slapdAdminPW: <password>
    ibm-slapdSizeLimit: <sizelimit>
    ibm-slapdTimeLimit: <timelimit>
    ibm-slapdPagedResAllowNonAdmin: TRUE
    

    You must restart the server for any changes to take effect.

    ibm-slapdPagedResLmt
    By default, the server allows a maximum of three outstanding simple paged results operations at any given time. To ensure the fastest response for subsequent simple paged results request, the server holds a database connection open throughout the life of the search request until the user cancels the simple paged results request, or the last result is returned to the client application. This administrative limit is designed to ensure that other operations being handled by the server are not denied service because all database connections are in use by outstanding simple paged results search requests. It is recommended that you set the ibm-slapdPagedResLmt value lower that the maximum number of database connections for your server. To change the value of this administrative limit, change the following line, ibm-slapdPagedResLmt: 3, in the slapd32.conf file. If the line does not exist add it to set the new maximum (if the line does not exist, the server is using the default value).
    dn: cn=Configuration
    cn: Configuration
    ibm-slapdAdminDn: <adminname>
    ibm-slapdAdminPW: <password>
    ibm-slapdSizeLimit: <sizelimit>
    ibm-slapdTimeLimit: <timelimit>
    ibm-slapdPagedResLmt: 4
     
    

    You must restart the server for any changes to take effect.

    ibm-slapdPagedSizeLmt
    By default, the server returns a maximum of 50 search results for a single page. If you would like to set a different page size maximum, you can change the following line, ibm-slapdPagedSizeLmt: 50, in the slapd32.conf file. If the line does not exist, add it with the value of the new maximum page size.
    dn: cn=Configuration
    cn: Configuration
    ibm-slapdAdminDn: <adminname>
    ibm-slapdAdminPW: <password>
    ibm-slapdSizeLimit: <sizelimit>
    ibm-slapdTimeLimit: <timelimit>
    ibm-slapdPagedSizeLmt: 40
     
    

    You must restart the server for any changes to take effect.

    ibm-slapdIdleTimeOut
    The idle time out administrative limit is designed to age out DB2 database connections held open for simple paged results search requests. The default idle time for simple paged results request is 500 seconds. For example, if a client application were to pause for 510 seconds between pages, the server would age out the request in order to free the database connection for use by other server operations. The server returns the appropriate error to the client application for the next simple paged results request submitted, at which point the client application needs to restart the simple paged results request. The idle timer for each simple paged results request is restarted after every page returned to the client application. The server checks for aged out simple paged results request every 5 seconds, so if you set the value of ibm-slapdIdleTimeOut value lower than 5 seconds, you still have to wait 5 seconds for the simple paged results requests to be aged out. To change the value of this administrative limit, change the following line, ibm-slapdIdleTimeOut: 300, in the slapd32.conf file. If the line does not exist add it to set the new maximum (if the line does not exist, the server is using the default value).
    dn: cn=Configuration
    cn: Configuration
    ibm-slapdAdminDn: <adminname>
    ibm-slapdAdminPW: <password>
    ibm-slapdSizeLimit: <sizelimit>
    ibm-slapdTimeLimit: <timelimit>
    ibm-slapdIdleTimeOut: 180
    

    You must restart the server for any changes to take effect.

    The LDAP server returns all referrals to the client at the end of a search request, the same as is done today. That means that if the server has 10 pages of results returned, all the referrals are returned on the 10th page, not at the end of each page. When chasing referrals, the client (this actually means the application using the client - but to the server it is still the client) needs to send in an initial paged results request, with the cookie set to null, to each of the referral servers. It is up to the application using the client services to decide whether or not to set the criticality as to the support of paged results, and to handle a lack of support of this control on referral servers as appropriate based on the application. Additionally, the LDAP server does not ensure that the referral server supports paged results controls. Multiple lists could be returned to the client application, some not paged. It is at the client application's decision as to how to best present this information to the end user. Possible solutions include: combine all referral results before presenting to the end user; show multiple lists and the corresponding referral server host name; take no extra steps and show all results to the end user as they are returned from the server. The client application must turn off referrals to get one truly paged list, otherwise when chasing referrals with the paged results search control specified, unpredictable results may occur.

    More information about the server side simple paged results control can be found in RFC 2686. The control OID for simple paged results is 1.2.840.113556.1.4.319, and is included in the RootDSE information as a supported control.


    Setting Performance

    Note:
    For the latest tuning information, see the IBM Directory Version 4.1 Tuning Guide located on the IBM Directory Server Web site located at http://www-306.ibm.com/software/network/directory/library/.
    To change the search limits, and connections settings to enhance performance do the following:

    Using Server Administration:

    1. If you have not done so already, click the arrow to the left of Settings in the navigation area, then click Performance.
    2. Select the Search size limit. This sets maximum number of entries a search returns. If more entries fit the search criteria, they are not returned.
    3. Select the Search time limit. This sets the maximum amount of time the server spends processing the request.
    4. Select the number of DB connections. This sets the number of DB2 connections used by the server. If your LDAP server receives a high volume of client requests or clients are receiving "connection refused" errors, you may see better results by increasing the setting of the ODBCCONN environment variable. The ODBCCONN environment variable controls the number of connections made to DB2 by the server. The following settings apply for all platforms:
    5. Click Update.
    6. You must restart the server using the Restart icon in the upper right corner for the changes to take effect.

    Using the command line - required for the Linux and HP-UX operating systems:

    To set the performance settings manually you must edit the slapd32.conf file.

    To set the maximum number of entries that a search returns and the maximum amount of time the server spends processing a request (in seconds) modify the entries highlighted in bold in the initial stanza cn=Configuration . This example uses the default settings.

    dn: cn=Configuration
    cn: Configuration
    ibm-slapdAdminDn: cn=root
    ibm-slapdAdminPW: >1Ex7zvuIMihVY+WCWxkJeU6JdnYG0lnLIvNE6THzSJir4Q6Rzyr5oxU
                       iwv8cZjS6qoKExlLlvQGNIFGV5RePwkB/D382sQYx34zUJxDkJfr1B4c
                       Ematpbu5eQAi4I1JtNTfxO2chSQRhoQednv/9AvF77p+7s7DlJq<
    ibm-slapdErrorLog: /tmp/slapd.errors
    ibm-slapdPort: 389
    #ibm-slapdPwEncryption must be one of none/imask/crypt/sha
    ibm-slapdPwEncryption: imask
    ibm-slapdSizeLimit: 500
    #ibm-slapdSysLogLevel must be one of l/m/h (l=terse, h=verbose)
    ibm-slapdSysLogLevel: m
    ibm-slapdTimeLimit: 900
    objectclass: top
    objectclass: ibm-slapdTop
    

    To set the number of DB2 connections used by the server modify the entry highlighted in bold in the stanza dn: cn=Directory, cn=RDBM Backends, cn=IBM SecureWay, cn=Schemas, cn=Configuration.

    dn: cn=Directory, cn=RDBM Backends, cn=IBM SecureWay, cn=Schemas, cn=Configuration
    cn: Directory
    ibm-slapdDbConnections: 15
    ibm-slapdDbInstance: ldapdb2
    ibm-slapdDbLocation: C:
    ibm-slapdDbName: ldapdb2
    ibm-slapdDbUserId: ldapdb2
    ibm-slapdDbUserPW: >1dBKs26P8vD5nK+dDOT+OBpZ0TNdlfvhD2sOzCjITaFXVaN4E3l4DkucG
                        srQ6ulr1h0cClbN9uqrehllRVitB+J1OWPANCMezC27wOidzJHw6i0l0gy
                        IBf80pVs/qGpdAjpDoZDGNZpptEboU9uNdIJsZgCGN9lS7e<
    ibm-slapdPlugin: database /bin/libback-rdbm.dll rdbm_backend_init
    ibm-slapdPlugin: preoperation /bin/libcl.dll CLInit cn=changelog
    ibm-slapdReadOnly: FALSE
    ibm-slapdSuffix: cn=localhost
    ibm-slapdSuffix: o=ibm, c=us
    objectclass: top
    objectclass: ibm-slapdRdbmBackend
    
    Note:
    For all platforms:

    Starting and stopping the server

    You can use either method to start or stop the server. However, you cannot combine the methods. If you start the server using Server Administration, you must use Server Administration to stop the server. Do not use the command line method to stop the server if you have used Server Administration to start it.

    Using Server Administration:

    1. If you have not done so already, click the arrow to the left of Current state, then click Start/Stop in the navigation area.
    2. The message area displays the current state of the server (running or stopped). Depending on the state of the server, Running or Stopped, a Stop or Start button enables you to change the state of the server.
    3. A message displays when the server successfully starts or stops.

    Using the command line - required for the Linux and HP-UX operating systems:

    Use the following commands to start and stop the server on UNIX platforms:

    1. Start the server (it takes longer to start the first time, because it must build all the DB2 tables):
      slapd
      
    2. Verify that the server is running:
      ps -ef | grep slapd
      
    3. Stop the server:
      kill -9  `cat /etc/slapd.pid ` 
      

      Notes:

      1. The ` is a reverse tic mark. It is located on the same key as the tilde mark.

      2. If you need to determine the pid number, you can find it in the same directory as the slapd32.conf file or you can issue the following command:
        cat / etc/slapd.pid
        

    For Windows systems:

    1. From the desktop, double-click the My Computer icon.
    2. Double-click the Control Panel icon.
    3. Double-click the Services icon.
      Note:
      For the Windows 2000 operating system the path is Start-> Settings-> Control Panel ->Administration Tools-> Services.
    4. Select IBM Directory V4.1 and click Stop.
    5. Select IBM Directory V4.1 and click Start.

    Understanding Databases


    Working with DB2 databases

    Use the following tasks to administer your DB2 database:

    Updating settings

    If you need to change or update the settings of your database, perform the following:

    Using Server Administration:

    If you have not done so already, click the arrow to the left of Database in the navigation area.

    1. Click Settings. The following information is displayed:
    2. Selecting the Read only radio button prevents any updates to the database. This is useful if you are synchronizing replica servers. Users can view the data or perform searches, but cannot perform any update operations until the permission has been reset to Read/Write. The Read/Write radio button is selected as the default.
    3. If you want to change the database administrator's password, enter a <newpassword>in the New password field to update the server configuration.
    4. Enter the <newpassword> again in the Confirm password field to confirm there are no typographical errors.
    5. Click Update.
    6. After a message displays indicating the changes were successfully updated, you must restart the server using the Restart icon in the upper right corner for the changes to take effect.

    Using the command line - required for the Linux and HP-UX operating systems:

    The DB2 database used by the IBM Directory has settings that can be tuned to improve performance or to address errors reported by DB2 indicating a resource that needs to be increased. The DB2 errors contain the name of the parameter to be reset (but does not recommend a value). Before changing any of these parameters, it is important to record the default settings in case you need to restore these settings. See the IBM Directory Server Version 4.1 Tuning Guide for the recommended settings.

    To get the current DB2 parameter settings:

    1. Log on as the instance owner (for example, ldapdb2):
      su - ldapdb2
      
      Note:
      For Windows systems you must issue the db2cmd command to get a db2 command line prompt instead of using the UNIX su - ldapdb2 command. If db2cmd does not work on your machine, click Start->Programs->IBM DB2->Command Line Processor.
    2. Start the instance (unless it is already started):
      db2start
      
    3. Get the current state for the database (for example, ldapdb2):

      db2 get db cfg for ldapdb2 |tee ldapdb2.cfg.orig
      

      You can find the DB2 configuration information in the ldapdb2.cfg.orig file.

    To reset a DB2 parameter (for example, APPLHEAPSZ):

    1. Log on as the instance owner (for example, ldapdb2):
      su - ldapdb2
      
      Note:
      For Windows systems you must issue the db2cmd command instead of the UNIX su - ldapdb2 command.
    2. Start the instance (unless it is already started):
      db2start
      
    3. Type the command:
      db2 update db cfg for ldapdb2 using APPLHEAPSZ 256
      
    4. Stop the directory server and all other applications that use this database:
      kill -9 `cat /etc/slapd.pid` 
      db2 force application all
      
      Note:
      For Windows systems you need to stop the server through the Services panel.
    5. Restart the IBM Directory server to activate the changed settings:
      slapd
      

    Importing database entries

    Although the server can now run, the directory does not contain any data. To add data do one of the following.

    Note:
    You must have at least one suffix defined.

    Using Server Administration:

    If you have not done so already, click the arrow to the left of Database in the navigation area.

    1. Click Import LDIF.
    2. Enter the Path and file name for the LDAP Data Interchange Format (LDIF) formatted file. Database entries are imported in the directory structure contained in the LDIF file.
      Note:
      The file must exist on the LDAP server, not necessarily where the browser is running.
    3. Click Import.
    4. After a message displays indicating the file was successfully imported, you must restart the server using the Restart icon in the upper right corner for the changes to take effect.
    5. Optimize the database after importing an LDIF file. See Optimizing a database for more information.

    Using the command line - required for the Linux and HP-UX operating systems:

    You can define a suffix by editing the /usr/ldap/etc/slapd32.conf file. You can add data in numerous ways. This example imports an LDIF file containing sample data rooted at the suffix 'o=ibm,c=us'.

    1. Define the suffix:
      1. Open /usr/ldap/etc/slapd32.conf in your editor.
      2. Verify that the suffixes, o=ibm,c=us, have been previously defined as in the line indicated by bold type in the last entry before 'cn: Directory':
        dn: cn=Directory,cn=RDBM Backends,cn=IBM SecureWay,cn=Schemas,
            cn=Configuration
        ...
        	ibm-slapdDbUserPW: ******
          ibm-slapdSuffix:  o=ibm,c=us
        	cn: Directory
        
      3. Save the file.

      See Understanding suffixes for additional information.

    2. Import the sample data:
      ldif2db -i /usr/ldap/examples/sample.ldif
      

    Backing up a database

    Use either of the following methods to back up your database.

    Notes:

    1. The server and DB2 instance must be stopped to perform this task.

    2. This procedure is not for use with migration. For the correct procedure to backup your database for migration, see the Migration section of the IBM Directory Server Version 4.1 Installation and Configuration Guide for Multiplatforms.

    Using Server Administration:

    If you have not done so already, click the arrow to the left of Database in the navigation area.

    1. click DB2 backup.
    2. Enter a directory path in which to backup all directory data and configuration settings.
    3. Select to either:
    4. Click Backup.

    Using the command line - required for the Linux and HP-UX operating systems:

    To back up the directory, use the following commands:

    For UNIX systems:
    su - ldapdb2
    db2 backup database ldapdb2 to </a/big/filesystem/backup>
    

    For Windows systems:
    db2cmd
    db2 backup database ldapdb2 to </a/big/filesystem/backup>
    
    Note:
    If db2cmd does not work on your machine, click Start->Programs->IBM DB2->Command Line Processor, then issue the following command:
    backup database ldapdb2 to </a/big/filesystem/backup>
    

    Note:
    Specify a file system with enough free space for the backup. Give only the path name. DB2 names the backup files based on a timestamp.

    Restoring a database

    If you need to replace your existing database with one that has been previously backed up, stop the server and do either of the following:

    Note:
    The server must be stopped to perform this task.

    Using Server Administration:

    If you have not done so already, click the arrow to the left of Database in the navigation area.

    1. Click DB2 restore.
    2. Enter the directory path from which to restore all the directory data and configuration settings.
    3. Select the Restore data only if you want to restore only the directory data and not the configuration settings.
    4. Click Restore.
    5. You must restart the server using the Restart icon in the upper right corner for the changes to take effect.

    Using the command line - required for the Linux and HP-UX operating systems:

    Issue the following command:

    db2 restore database ldapdb2 from </a/big/filesystem/backup> replace existing
    

    Exporting database entries

    You can export database entries to an LDIF file.

    Using Server Administration:

    If you have not done so already, click the arrow to the left of Database in the navigation area, then click Export LDIF.

    1. Enter the Path and file name for the LDIF file.
    2. The default path and file is platform-specific:
    3. Select the checkbox for Overwrite if file exists if you want to overwrite the existing file.
    4. Click Export.

    Using the command line - required for the Linux and HP-UX operating systems:

    Use the db2ldif command to export database entries:

    db2ldif -o /temp/<directory>.ldif
    

    where:

    -o
    is the output file name.

    You can also use the -s option, if you want to export entries with a specific suffix. The default is to export all the entries.

    Note:
    If you data is extensive, you might need to specify a directory with greater capacity than the temp directory.

    Optimizing a database

    After a significant amount of update activity on a directory, you might need to use the DB2 maintenance utilities to free up unused disk space and to make the queries more efficient. Optimizing the DB2 database updates the statistics to improve performance and query speed.

    Note:
    The server must be stopped to perform this task.

    Using Server Administration:

    If you have not done so already, click the arrow to the left of Database in the navigation area.

    1. Click DB2 optimize.
    2. Click Optimize.
    3. After a message displays indicating the database was successfully optimized, you must restart the server using the Restart icon in the upper right corner for the changes to take effect.

    Using the command line - required for the Linux and HP-UX operating systems:

    Note:
    You must stop the server before using any of the following utilities.

    The IBM Directory Server includes a runstats utility that updates the database statistics. This utility is located in the usr/ldap/sbin directory on UNIX systems and in the <ldap installation directory>\bin directory on Windows systems. To update the statistics using the command line issue the following command:

    runstats
    

    Additionally you can use the reorgchk utility periodically to see if you have DB2 tables that need to be reorganized.

    kill -9 `cat /etc/slapd.pid`
    db2 reorgchk update statistics on table all
    
    Note:
    For Windows systems stop the server using the Services panel instead of the UNIX kill command.
    The reorgchk command generates output such as the following:
    Doing RUNSTATS ....
     
    Table statistics:
     
    F1: 100*OVERFLOW/CARD < 5
    F2: 100*TSIZE / ((FPAGES-1) * (TABLEPAGESIZE-76)) > 70
    F3: 100*NPAGES/FPAGES > 80
     
    CREATOR  NAME                  CARD    OV    NP    FP    TSIZE  F1  F2 F3 REORG
    -------------------------------------------------------------------------------
    LDAPDB2  ABSTRACT                 -    -     -     -        -   -   -   -  --- 
    LDAPDB2  ACLPERM                  2    0     1     1      138   0   - 100  --- 
    LDAPDB2  ACLPROP                  2    0     1     1       40   0   - 100  --- 
    LDAPDB2  ADDITIONAL          150600    0  5043  5043 20180400   0  99 100  *-* 
    LDAPDB2  ADDRESS1               709    0    15    15    58847   0 100 100  --- 
     
      ... etc ...
    

    The *-* characters in the REORG column indicate that a table needs to be reorganized. You can do this with the reorg command. For the given example issue the command:

    db2 reorg table LDAPDB2.ADDITIONAL
    

    UTF-8 support

    IBM Directory supports a wide variety of national language characters through the UTF-8 (UCS Transformation Format) character set. As specified for the LDAP Version 3 protocol, all character data that is passed between an LDAP client and a server is in UTF-8. Consequently, the directory server can be configured to store any national language characters that can be represented in UTF-8. The limitations on what types of characters can be stored and searched for are determined by how the database is created. The database character set can be specified as "UTF-8" or it can be allowed to default to the server system's local character set (based on the locale, language, and code page environment).

    If you specify UTF-8, you can store any UTF-8 character data in the directory. LDAP clients running anywhere in the world (in any UTF-8 supported language) can access and search the directory. In many cases, however, the client has limited ability to properly display the results retrieved from the directory in a particular language/character set.

    Why choose anything other than UTF-8?

    A UTF-8 database has a fixed collation sequence. That sequence is the binary order of the UTF-8 characters. It is not possible to do language-sensitive collation with a UTF-8 database.

    If it is important to your LDAP applications or users to get results for a search using an ordering filter (for example, "name >= SMITH") or any search specifying the control to sort the results, as they would expect for their native language, then UTF-8 might not be the appropriate character set for their directory database. In that instance, the LDAP server system and all client systems should run using the same character set and locale. For example, an LDAP server running in a "Spanish" locale with a database created using that locale returns results of searches based on character ordering, as Spanish-language clients would expect. This configuration does limit your directory user community to a single end-user character set and collation sequence.

    Creating a UTF-8 database

    If you wish to create your own database using the UTF-8 character set and configure it as a custom database for your directory, you can do the following:

    Open a DB2 Command Line Processor window. Enter the following command at the db2 => command prompt:

    CREATE DATABASE <databasename> USING CODESET UTF-8 TERRITORY US
    

    Remember to update the following stanza in the slapd32.conf file with your actual database name.

    DN: cn=Directory cn=RDBM Backends cn=IBM SecureWay cn=Schemas cn=Configuration
    ibm-slapdDbName: <databasename>
    ibm-slapdUserID: <username>
    ibm-slapdDbUserPW: <password>
    ibm-slapdDbInstance: <username>
    

    Supported IANA character sets

    The IBM Directory supports the following Internet Assigned Number Authority (IANA) character set names by platform:

    Table 3.

    Character Locale DB2 Code Page
    Set Name Linux, Linux_390, HP-UX NT AIX Solaris UNIX NT
    ISO-8859-1 X X X X 819 1252
    ISO-8859-2 X X X X 912 1250
    ISO-8859-5 X X X X 915 1251
    ISO-8859-6 X X X n/a 1089 1256
    ISO-8859-7 X X X n/a 813 1253
    ISO-8859-8 X X X n/a 916 1255
    ISO-8859-9 X X X n/a 920 1254
    IBM437 n/a X n/a n/a 437 437
    IBM850 n/a X X n/a 850 850
    IBM852 n/a X n/a n/a 852 852
    IBM857 n/a X n/a n/a 857 857
    IBM862 n/a X n/a n/a 862 862
    IBM864 n/a X n/a n/a 864 864
    IBM866 n/a X n/a n/a 866 866
    IBM869 n/a X n/a n/a 869 869
    TIS-620 n/a X X n/a 874 874
    EUC-JP X n/a X X 954 n/a
    EUC-KR n/a n/a X X 970 n/a
    EUC-CN n/a n/a X X 1383 n/a
    EUC-TW n/a n/a X X 964 n/a
    Shift-JIS X X X X 932 943
    KSC n/a X n/a n/a n/a 949
    GBK n/a X X n/a 1386 1386
    Big5 n/a X X X 950 950

    Server utilities

    Manual creation of an LDIF file containing UTF-8 values is difficult. To simplify this process, a charset extension to the LDIF format is supported. This extension allows an IANA character set name to be specified in the header of the LDIF file (along with the version number). A limited set of the IANA character sets are supported.

    Examples

    You can use the optional charset tag so that the server utilities automatically convert from the specified character set to UTF-8 as in the following example:

    version: 1
    charset: ISO-8859-1
     
    dn: cn=Juan Griego, o=University of New Mexico, c=US
    cn: Juan Griego
    sn: Griego
    description:: V2hhdCBhIGNhcmVmdWwgcmVhZGVyIHlvd
    title: Associate Dean
    title: [title in Spanish]
    jpegPhoto:< file:///usr/local/photos/jgriego.jpg
    

    In this instance, all values following an attribute name and a single colon are translated from the ISO-8859-1 character set to UTF-8. Values following an attribute name and a double colon (such as description:: V2hhdCBhIGNhcm... ) should be base 64-encoded, and are expected to be either binary or UTF-8 character strings. Values read from a file, such as the jpegPhoto attribute specified by the URL in the example above, are also expected to be either binary or UTF-8. No translation from the specified "charset" to UTF-8 is done on those values.

    In this example of an LDIF file without the charset tag, content is expected to be in UTF-8:

    # IBM IBM Directorysample LDIF file
    #
    # The suffix "o=IBM, c=US" should be defined before attempting to load
    # this data.
     
     version: 1
     
     dn: o=IBM, c=US
     objectclass: top
     objectclass: organization
     o: IBM
     
     dn: ou=Austin, o=IBM, c=US
     ou: Austin
     objectclass: organizationalUnit
     seealso: cn=Linda Carlesberg, ou=Austin, o=IBM, c=US
    

    This same file could be used without the version: 1 header information, as in previous releases of the IBM Directory:

    # IBM IBM Directorysample LDIF file
    #
    #The suffix "o=IBM, c=US" should be defined before attempting to load
    #this data.
     
     dn: o=IBM, c=US
     objectclass: top
     objectclass: organization
     o: IBM
     
     dn: ou=Austin, o=IBM, c=US
     ou: Austin
     objectclass: organizationalUnit
     seealso: cn=Linda Carlesberg, ou=Austin, o=IBM, c=US
    

    Configuring the directory to use a database

    You can configure the directory server to use the default DB2 database or use an existing DB2 database of your own.

    Using Server Administration:

    To configure the directory server to use the default DB2 database:

    1. If you have not done so already, click the arrow to the left of Database in the navigation area, then click Configure.
    2. Select Use default database, then click Next.
    3. Select either:
    4. Click Next.
    5. Select either:
    6. Click Finish.

    To configure the directory server to use an existing DB2 database of your own:

    Note:
    The database must have been created using the DB2 provided interfaces.
    1. If you have not done so already, click on the arrow to the left of Database in the navigation area, then click Configure.
    2. Select Use custom database, then click Next.
    3. Select either:
    4. Click Next.
    5. Enter the Database name of the existing DB2 database that you want to use with this server.
    6. Enter the Database instance.
    7. Enter the Database system administrator userid.
    8. Enter the Database system administrator password.
    9. Enter the password again to confirm there are no typographical errors.
    10. Click Finish.

    Using the command line - required for the Linux and HP-UX operating systems:

    You must tell the server to use the database that you created. Scroll down to the last entry in the slapd32.conf file and insert the lines indicated in bold type before 'cn: Directory':

    dn: cn=Directory,cn=RDBM Backends,cn=IBM SecureWay,cn=Schemas,cn=Configuration
    	objectclass: top
    	objectclass: ibm-slapdRdbmBackend
       ibm-slapdDbInstance: ldapdb2
       ibm-slapdDbName: ldapdb2
       ibm-slapdDbUserId: ldapdb2
       ibm-slapdDbUserPW: <password>
    	cn: Directory
    

    where ldapdb2 is the name of your database and <password> is the password you set when you created the database.


    Replication

    Note:
    These procedures are the same for default and custom databases.

    Replication is a technique used by directories to improve performance, reliability, or both. The replication process keeps multiple directories synchronized.

    There are several benefits realized through replication. The largest benefit is providing a means of faster searches. Instead of having all search requests directed at a single server, the search requests can be spread among several different servers. This improves the response time for the request completion.

    Through replication, a change made to one directory is propagated to one or more additional directories. In effect, a change to one directory shows up on multiple different directories. The IBM Directory supports a master-slave replication model. There are three types of directories: masters, replicas and peers. The IBM Directory refers to the master as the master server. The replicas are referred to as replica servers.

    Table 4. Master-replica server definitions

    Master The master server contains the master directory information from where updates are propagated to the replicas. All changes are made and occur on the master server, and the master is responsible for propagating these changes to the replicas (slaves).
    Replica An additional server that contains a directory replica. The replicas must be exact copies of the master. The replica provides a backup to the master server. Even if the master server crashes, or is unreadable, the replica can still fulfill search requests and provide access to the data.
    Peer-to-peer Peer replication is a replication in which multiple servers are masters. However, unlike a multi-master environment, no conflict resolution is done among peer servers. LDAP servers accept the updates provided by peer servers, and update their own copies of the data. No consideration is given for the order the updates are received, or whether multiple updates conflict.

    Normally only one master server is allowed, except in peer-peer replication (see Using peer-to-peer replication). Replicas cannot serve as masters to other replicas. You can request some types of updates on a replica server, but the update is actually forwarded to the master server and made there. The master server then sends the update to the replicas. Until the master has completed replication of the update, the change is not reflected on the replica server where it was originally requested.

    If you are no longer using a replica, you must remove its definition from the master server. Leaving the definition causes the server to queue up all updates and use unnecessary directory space. Also, the master server continues trying to contact the missing replica to retry sending the data.


    Adding replicas

    Use the following procedures to add replica servers.

    Note:
    The server must be running to perform this task.

    Using Server Administration:

    1. If you have not already done so, click the arrow to the left of Replication in the navigation area
    2. Click the arrow to the left of Replicas
    3. Click Add a replica.
    4. Enter a Common name for the replica. This is the name that refers to the replica. This can be in any format and is used for your reference.
    5. Enter the Host name. This is the name of the host where the replica directory resides.
    6. Enter the Port number. This is the port number on the replica host. This is also the port number that the master uses to contact the replica. This must match either port number or secure port number on the replica server, depending on the encryption setting.
    7. Select the Authentication type. Use either use Kerberos or Simple authentication to connect to the replica.
    8. Select Yes if you want to Use SSL or No if you do not want to use SSL.
    9. Select a radio button to indicate whether you want this replica to be updated immediately or if you want to delay the update for a specified number of seconds. If you select the seconds radio button, enter in a value. You can use the replica update interval to group changes to improve the update performance on the master server.

      If a change is made to the master, the change is not sent to the replicas for the time specified by the replica update interval. When the Update interval time elapses, this change and all other accumulated changes (changes made during the interval) are replicated. Any changes made during the time that the master is replicating are also replicated. After the master replicates all pending changes, it waits for new changes. When the master receives a new change, it waits for the specified update interval before replicating the new change.

    10. Enter the Master DN.
    11. Enter the Password.
    12. Enter the password again to confirm there are no typographical errors.
    13. Click Add.
    14. You must restart the server using the Restart icon in the upper right corner for the change to take effect.

    Using the command line - required for the Linux and HP-UX operating systems:

    To add a replica server you can use the ldapmodify command.

    ldapmodify  -c -V 3 -D <admindn> -w <adminpw> -f myschema.ldif
     
    

    where the myschema.ldif file contains minimally the required attributes (highlighted in bold in this example):

    dn: cn=replica_1, cn=localhost
    changetype: add
    objectclass: replicaObject
    cn: replica_1
    replicaHost: ldapaixtaa.austin.ibm.com
    replicaBindDn: cn=Blade Runner
    replicaCredentials: replicant
    replicaPort: 389
    replicaBindMethod: Simple
    replicaUseSSL: FALSE
    replicaUpdateTimeInterval: 0
    description: replica object added by 15134 S3LDSM00.pl
    

    See also 2a.


    Replica synchronization

    If an interruption occurs during replication use the following procedures to verify whether the replicas are synchronized with the master:

    To test if all replicas are synchronized to the master server:

    1. Log on as ldapdb2 ( the database instance owner) and issue the following commands:
      Note:
      For Windows systems you must log on as a member of the Administrators group and issue the DB2 commands from a DB2 command window.
    2. db2 connect to ldapdb2
    3. db2 "select count (id) from ldapdb2.change"
      Note:
      id is the actual column name, not an ID.
    4. db2 terminate

    Replication is synchronized for all replicas if the master's ldapdb2.change table has 0 rows. This means that replication is complete at the time the command was issued.

    To test if a given replica is synchronized to the master server:

    1. Log on as ldapdb2 ( the database instance owner) and issue the following commands:
      Note:
      For Windows systems you must log on as a member of the Administrators group and issue the DB2 commands from a DB2 command window.
    2. db2 connect to ldapdb2
    3. db2 "select count (id) from ldapdb2.change"
    4. db2 "select count (id) from ldapdb2.progress where (prg = '<replica dn>')"
      Note:
      prg is the actual column name, not a variable.

      For example <replica dn> might be: 'cn=replica1, cn=localhost'

    5. db2 terminate

    A given replica is synchronized with the master if the number of rows in the master's ldapdb2.progress table (where prg = the dn of the replica object of the given replica ) is equal to the number of rows in the masters ldapdb2.change table. This means that replication is complete for the given server at the time the command was issued.

    Resynchronizing replicas

    If one or more of the replicas are out of synchronization, use the following steps to synchronize all of the replicas.

    1. Stop the master server.
    2. Wipe out the change and progress tables.
      1. db2 delete from ldapdb2.change
      2. db2 delete from ldapdb2.progress
    3. Back up the master server database.
    4. Stop the replica servers
    5. At this point it is safe to restart the master server because all updates will be accumulated. Start the master server.
    6. Restore the master's back-up database on to the replica.
    7. Restart each replica server after the restore is complete.

    Cleaning change tables

    If your replicas are not synchronized with the master you might want to do the following to clean the change table.

    1. Stop the master server.
    2. Log on as the DB instance owner (for example, ldapdb2)
      Note:
      For Windows systems you must log on as a member of the Administrators group and issue the DB2 commands from a DB2 command window.
    3. Issue the command db2 connect to "ldapdb2"
    4. Determine the id number of the change that is blocking replication.
      db2 select id from change fetch first 1 row only
      
    5. If this change has been replicated to all the replica servers and the master server is still attempting to send it, you can delete the entry.
      db2 "delete from ldapdb2.change where (id = X)"
      

      where X is the id determined in the previous step. After the entry is deleted from the change table and the master server is restarted, the entry is not replicated.


    Configuring replicas

    Notes:

    1. When you are configuring a replica server, ensure that you set the master DN to an ID that is not the same as the admin DN on the replica server. If these DN IDs are the same, the replica servers can become unsynchronized with the master server. This causes errors on the master and causes the data on the servers to be inconsistent.

    2. The only data that is replicated is data that is added to the server after defining the replicas.

    3. Ensure that the directories are synchronized before configuring a replica (see Replica synchronization) or that you define the replica before adding any data to your master server.

    The main concern is to prevent any updates to the directory while the data is being added to the master. There are several different ways to configure your master and replica. Two methods are presented in the following.

    Using Server Administration:

    If you have not done so already, click the arrow to the left of Replication in the navigation area, then click Settings.

    Using the command line - required for the Linux and HP-UX operating systems:

    Use the following procedures to configure replicas manually.

    Simple configuration

    The simple configuration has fewer steps than the other method presented, but it can be slower for large directories and can be used only when the master directory is initially loaded. Use General configuration when you are adding a replica to a master that is already loaded with data.

    1. Configure your master server and replicas as normal, unreplicated LDAP servers.
    2. Configure a master server. For each replica server, the master server needs to know:

      The following information must be added to the directory on the master.

      1. Use an LDIF file to add a replica object to a master server's directory. See the following example for a file named myreplica.ldif (the information in bold type is needed when you configure the replica server).
        dn: cn=myreplica,cn=localhost 
        cn: myreplica 
        objectClass: replicaObject 
        objectClass: top
        replicaHost: myreplica.mycompany.com 
        replicaBindDn: cn=master 
        replicaCredentials: master2pass 
        replicaPort: 389 
        replicaBindMethod: Simple 
        replicaUseSSL: FALSE 
        replicaUpdateTimeInterval: 0
        
      2. Bind as the admin DN by issuing the following command:
        ldapadd -D cn=admin -w admin2pass -c -d<debuglevel> -f myreplica.ldif
        

      The advantage of this method is that the replica can be added without having to stop and restart the master.

    3. Configure each replica to be a replica server. You must tell each replica the master DN and password as defined in step 2, indicated by bold type in the following example. You also must specify the host name of the master, also indicated in bold type, in the ibm-slapdMasterReferral attribute. Add the following object to the slapd32.conf file. Ensure that a single blank line appears before and after this object.
      dn: cn=Master Server,cn=Configuration
      objectclass: top
      objectclass: ibm-slapdReplication
      cn: Master Server
      ibm-slapdMasterPW: masterpass2
      ibm-slapdMasterDN: cn=master
      ibm-slapdMasterReferral: ldap://mymaster.mycompany.com
      
      Note:
      Remove this object from the slapd32.conf file, if the server is no longer treated as a replica.
    4. Make sure that each replica server has the same suffixes defined as the master. Also make sure that each replica server has the same object class and attribute definitions as the master server. (In other words, they must have identical schema files.)
    5. Restart all of your IBM Directory servers (master and replicas) to make sure that any changes to their configurations are activated.
    6. You can enter data onto the master using the command line utilities for loading data, ldapadd (recommended), or ldif2db.

      If you use ldapadd, the server is running. When the data is loaded onto the master, the master begins replicating it to all of the replica servers.

      If you use ldif2db to load the data, you must first stop the server. After the data has completed loading on the master, restart the master server . This causes the master to replicate the data onto all of the replicas. It is very important that you restart the master server after you have added entries and before defining any additional replicas, or the master and new replica can become out-of-synchronization.

      It is not necessary to restart the master server, if you use ldapadd to add entries.

    Your IBM Directory configuration is ready for use. You do not need to wait until all of the data has finished replicating onto your replica servers before using the IBM Directory. However, not all data will be present on your replica servers until the process is complete, so your searches might return incomplete or missing data.

    Note:
    The critical things to keep in mind in the preceding steps are:

    General configuration

    The general configuration is used when you need to add a new replica server after the master server has had data loaded onto it. It can also be used to reload data onto a replica that becomes out of synchronization with the master.

    If this is a new replica, skip to step 5:

    1. Remove the replica definition from the master server.
    2. Shut down the replica server.
    3. Configure your replica as a normal, unreplicated LDAP server.
    4. Stop the master server.
    5. Back up the directory using db2ldif.
    6. Define the replica on the master server using the ldif2db utility. See step 2 of Simple configuration. This step causes the master server to begin queuing any updates for replication for any new replica servers.
    7. You can restart the master server.
    8. Make sure that the replica server has the same suffixes as the master server, and that the /etc/v3.system.oc and /etc/v3.system.at files and any included files are identical to the master server. Do not define the replica server as a replica by adding a master DN and password at this time. The directory on the replica might become damaged if the master server contacts the replica server before having its directory loaded. This is because the master might send updates that depend upon data that is not yet loaded. If your directory becomes damaged, or you suspect that it might be damaged, begin the configuration again with step 1.
    9. Load the replica server using ldif2db or bulkload. Do not restart the server before this step.
    10. Define the replica as a replica server and specify the DN and password for the master server. See step 3 of Simple configuration.
    11. Restart the replica server. Any updates from the master that have been queued up since the directory backup was taken will begin to be propagated. It might take a few minutes before the updates begin to appear.

    Populating the directory for a replica using the DB2 backup and restore

    DB2 backup and restore provide an alternate way of creating a replica that is faster than using db2ldif and ldif2db or bulkload, especially with large directories.

    There are two ways to use DB2 utilities to populate, or re-synchronize, the directory for a replica. If you already have a replica, you can copy its directory and leave the master server running. You can also copy the directory of the master server.

    To copy from a replica:

    1. Verify that the replica to be copied is current with the master server.
    2. Configure the master server to use the replica to be added.
    3. Stop the directory server on the replica to be copied.
    4. Do not stop the directory server on the master server. The changes will accumulate for the replica that was stopped and for the new replica. The master server will report errors contacting the new replica as well as the one that was stopped.
    5. Back up the directory on the existing replica using the following commands:
      su - ldapdb2
       
      
      Note:
      For Windows systems you must issue the db2cmd command ot create a DB2 command line prompt, instead of the UNIX su - ldapdb2 command. If db2cmd does not work on your machine, click Start->Programs->IBM DB2->Command Line Processor, then issue the following command:
      db2 backup database ldapdb2 to /a/big/filesystem/backup
      
      Note:
      Specify a file system with enough free space for the backup. Give only the path name. DB2 names the backup files based on a timestamp.
    6. After the backup is complete, start the directory server on the replica that was copied. The master server begins sending the replica any changes that are pending. Changes for the new replica are accumulated.
    7. Create the directory for the new replica by running the following commands on the host of the new replica:
      su - ldapdb2
       
      
      Note:
      For Windows systems you must issue the db2cmd command instead of the UNIX su - ldapdb2 command.
      db2 restore database ldapdb2 from /a/big/filesystem/backup replace existing                 
      

      Use the same file system name used for the backup.

    8. Start the directory server for the new replica. The master server sends changes made while the directory was being backed up and restored.

    To copy from a master:

    1. Stop the directory server on the master. No updates will occur until it is restarted.
    2. Back up the directory on the master server using the following commands:
      su - ldapdb2
       
      
      Note:
      For Windows systems you must issue the db2cmd command instead of the UNIX su - ldapdb2 command.
      db2 backup database ldapdb2 to /a/big/filesystem/backup
      

      Specify a file system with enough free space for the backup. Give only the path name. DB2 will name the backup files based on a timestamp.

    3. Configure the master to use the replica to be added. Use the ldif2db utility to add the replica object to the master. See2a.
    4. After the backup is complete, start the directory server on the master server. The master accumulates changes for the replica.
    5. Create the directory for the new replica using the following commands on the host of the new replica:
      su - ldapdb2
       
      
      Note:
      For Windows systems you must issue the db2cmd command instead of the UNIX su - ldapdb2 command.
      db2 restore database ldapdb2 from /a/big/filesystem/backup replace existing
      

      Use the same file system name used for the backup.

    6. Start the new replica. The master server begins sending any changes made while the directory was being restored.

      The master server uses the database tables named change and progress to coordinate replication. These tables are dropped and the directory entries for replica objects are ignored on the new replica.


    Listing replicas

    Use the following procedures to list the replica servers.

    Note:
    The server must be running to perform this task.

    Using Server Administration:

    If you have not done so already:

    1. click the arrow to the left of Replication in the navigation area
    2. Click the arrow to the left of Replicas
    3. Click List replicas.

    The replicas and their attributes are listed in the work area.

    Using the command line - required for the Linux and HP-UX operating systems:

    Use the ldapsearch command to list the replicas. For example:

    ldapsearch --h mymaster --D cn=admin --w admin2pass --b cn=localhost 
       "objectClass=replicaobject"
    
    Note:
    Bind as the administrator to see the credentials used by the master.

    Editing replicas

    Use the following procedures to edit a replica server.

    Note:
    The server must be running to perform this task.

    Using Server Administration:

    1. If you have not done so already, click the arrow to the left of Replication in the navigation area.
    2. Click the arrow to the left of Replicas
    3. Click Edit replicas.
    4. Edit the settings for the replica.
    5. Click Update.
    6. After you have successfully edited the replica information, you must restart the server using the Restart icon in the upper right corner for this change to take effect.

    Using the command line - required for the Linux and HP-UX operating systems:

    Use the ldapmodify command to edit the replica object in the master's directory. For example, to change the password that the master uses with the replica servers, issue the following command:

    ldapmodify -h anymaster -v -D cn=admin -w admin2pass -f mymod.ldif
    

    where the mymod.ldif file contains the following information:

    dn: cn=myreplica,cn=localhost 
    replicaCredentials: new2pass 
     
    

    Removing replicas

    Use the following procedures to remove replica servers.

    Note:
    The server must be running to perform this task.

    Using Server Administration:

    1. If you have not already done so, click the arrow to the left of Replication in the navigation area
    2. Click the arrow to the left of Replicas.
    3. Click Remove replicas.
    4. Select the check box for the replica you want to remove.
    5. Click Remove.

    Using the command line - required for the Linux and HP-UX operating systems:

    Use the ldapdelete command to remove a replica from the directory. For example:

    ldapdelete --h mymaster -v --D cn=admin --w admin2pass "cn=myreplica, cn=localhost"
    

    where "cn=myreplica, cn=localhost" is the DN of the replica that you want to delete.

    After the replica is removed, no update information is sent to that replica.


    Using peer-to-peer replication

    Peer replication is a replication in which multiple servers are masters. However, unlike a multi-master environment, no conflict resolution is done among peer servers. LDAP servers accept the updates provided by peer servers, and update their own copies of the data. No consideration is given for the order the updates are received, or whether multiple updates conflict.

    Use peer replication only in environments where the update vectors are well known. Updates to particular objects within the directory must be done only by one peer server. This is intended to prevent the scenario of one server deleting an object, followed by another server modifying the object. This scenario creates the possibility of a Peer server receiving a delete command followed by a modify command; which creates a conflict.

    Configuring

    At startup, a server queries the database to determine if there are any replica objects. These objects define replica or peer servers for this particular server. The schema definition for these objects describes how a server can locate and connect to the replica or peer server, as well as other replication properties.

    Within the slapd32.conf file there are currently several parameters relating to replication. If an ibm-slapdMasterServerDn and ibm-slapdMasterServerPW are specified, this server is presumed to be a read-only replica. The ibm-slapdMasterServerDn and ibm-slapdMasterServerPW in the slapd32.conf file must match the replicaBindDn and replicaCredentials in the replica object definition found on the master server.

    A peer server is designated in the slapd32.conf file with the attributes ibm-slapdPeerDn and ibm-slapdPeerPW in the cn=Master,cn=Configuration object.

    Note:
    The ibm-slapdPeerDn cannot be the same as the ibm-slapdAdminDn for peer replication to function correctly.
    This designates a writable copy of the database. Add a replica definition to all servers within the peer network representing all other peer servers. This is different from the replica, which does not have any replica definitions within the database. The ibm-slapdPeerDn and the ibm-slapdPeerPW in the slapd32.conf file must match the replicaBindDn and replicaCredentials in the replica definition found on the peer servers. Because these passwords must match, the same peer replica object definition can be used on all peer servers.

    A server can be either a replica server or a peer server, it can not be both. That means that the ibm-slapdMasterServerDn parameter in the slapd32.conf file is mutually exclusive with the ibm-slapdPeerDn configuration file attribute. If both are defined in the slapd32.conf file, the server does not start and the following message is logged in the slapd.errors file:

    Can not specify both masterServerDn and peerDn
    

    Example

    Machine 1 listens on port 389 and is a peer server of machine 2. If the entry dn: cn=Master Server, cn=Configuration is already present in the slapd32.conf file, start the server, turn off replication, and stop the server before proceeding. Otherwise, add the following section to the slapd32.conf file on machine 1:

    dn: cn=Master Server, cn=Configuration
    	cn: Master Server
    	ibm-slapdPeerDn:  cn=peer
    	ibm-slapdPeerPW:  <machine2password>
    	objectclass:  ibm-slapdReplication
    	objectclass:  top
    

    A replica object is added to the machine 1 database through the following ldif file:

    dn: cn=machine2, cn=localhost
    cn: machine2
    objectclass: replicaObject
    replicabindDN: cn=peer
    replicaCredentials: <machine2password>
    replicaPort: 389
    replicaHost: machine2.<fully-qualified-hostname>
     
     
    

    Machine 2 listens on port 389 and is a peer server of machine 1. If the entry dn: cn=Master Server, cn=Configuration is already present in the slapd32.conf file, start the server, turn off replication, and stop the server before proceeding. Otherwise, add the following section to the slapd32.conf file on machine 2:

    dn: cn=Master Server, cn=Configuration
    	cn: Master Server
    	ibm-slapdPeerDn:  cn=peer
    	ibm-slapdPeerPW:  <machine1password>
    	objectclass:  ibm-slapdReplication
    	objectclass:  top
    

    A replica object is added to the machine 2 database through the following ldif file:

    dn: cn=machine1, cn=localhost
    cn: machine1
    objectclass: replicaObject
    replicabindDN: cn=peer
    replicaCredentials:  <machine1password>
    replicaPort: 389
    replicaHost: machine1.<fully-qualified-hostname>
    

    Updates

    Updates that are received from peer servers are not propagated to any other replica or peer server definitions. When an update is received by a peer server, the update is applied to the database. If the update was received from a peer server, the update is applied and processing stops. If the update was made by another client, the directory is updated, and the update information is propagated to the other peers and replicas. Because peer servers do not propagate updates to other replica definitions, do not configure peer servers as master servers in a master-slave style replication.

    Access control

    The peer Dn ID is given the same level of permission as the master DN. Guard the peer DN ID and password carefully.

    Peer-to-peer attributes

    The Directory Information Tree object cn=Master Server, cn=Configuration supports two additional optional attributes:


    Referrals

    Referrals provide a way for servers to refer clients to additional directory servers. With referrals you can:

    Some of the advantages of using referrals are the ability to:

    This section describes how to use the referral object class and the ref attribute to construct entries in an LDAP directory containing references to other LDAP directories. This section also describes how to associate multiple servers using referrals and an example of this.


    Using the referral object class and the ref attribute

    The referral object class and the ref attribute are used to facilitate distributed name resolution or to search across multiple servers. The ref attribute appears in an entry named in the referencing server. The value of the ref attribute points to an entry maintained in the referenced server.

    Creating entries

    Following is an example configuration that illustrates the use of the ref attribute.

    Figure 1. Example of using the referral attribute

    referral attribute example graphic

    In the example, Server A holds references to two entries: o=ABC, c=US and o=XYZ, c=US. For the o=ABC, c=US entry, Server A holds a reference to Server B and for the o=XYZ, c=US entry, Server A holds a reference to Server C.

    The recommended setup of referrals is to structure the servers into a hierarchy based on the subtrees they manage. Then, provide "forward" referrals from servers that hold higher (closer to the root of the hierarchy) information and set the default referral to point back to its parent server.


    Associating servers with referrals

    To associate servers through referrals:

    Note:
    Referral objects can be seen from command line LDAP utilities by specifying the -M option.

    Pointing to other servers

    Use referral objects to point to the other servers for subordinate references, that is, portions of the namespace below this server that it does not service directly.

    Referral objects, like other objects, go in the backend (DB2). Referral objects consist of:

    dn:
    Specifies the distinguished name. It is the portion of the namespace served by the referenced server.

    objectclass:
    Specifies the value of the objectclass "referral".

    ref:
    Specifies the LDAP Web address of the server. This Web address consists of the ldap:// identifier, the hostname:port, and a DN. The identifier can be either a host name string or a TCP/IP address. The DN requires a slash (/) before it to delimit it from the hostname:port, and should match the DN of the referral object. It is highly recommended that the DN specified in the value of the referral attribute match the DN of the referral object. Typically, it is an entry in a naming context at or below the naming context held by the referencing server.
    dn:           o=IBM,c=US
    objectclass:  referral
    ref:          ldap://9.130.25.51:389/o=IBM,c=US
    

    Defining the default referral

    Define a default referral to reference a directory on another server. The default referral can be used to point to:

    Note:
    The default referral LDAP URL does not include the DN portion. It includes only the ldap:// identifier and the hostname:port.
    For example:
    # referral  
    dn: cn=Referral, cn=Configuration
    objectclass: top
    objectclass: ibm-slapdReferral
    cn: Referral
    ibm-slapdReferral ldap://dcecds3.endicott.ibm.com:389
    ibm-slapdReferral ldap://<additional hostname:port>
    ibm-slapdReferral ldap://<additional hostname:port>
    ibm-slapdReferral ldap://<additional hostname:port>
    

    Deleting default referrals

    To remove a default referral, you need to remove or comment out the appropriate line that contains the ldap identifier and the hostname:port information in the slapd32.conf file. For example:

    # referral  
    dn: cn=Referral, cn=Configuration
    objectclass: top
    objectclass: ibm-slapdReferral
    cn: Referral
    ibm-slapdReferral ldap://dcecds3.endicott.ibm.com:389
    #ibm-slapdReferral ldap://<additional hostname:port>
    ibm-slapdReferral ldap://<additional hostname:port>
    ibm-slapdReferral ldap://<additional hostname:port>
    

    Binding with a distributed namespace

    When performing searches, the same DN that was used to bind to the original server is used to bind to the referred-to server, unless the IBM Directory application is designed to modify the bind DN and credentials. The correct access must be set up for the same DN to be able to bind to both servers for chasing the referrals.


    An example of distributing the namespace through referrals

    Following are the steps involved in distributing the namespace using referrals.

    1. Plan your namespace hierarchy.
      country - US
      company - IBM, Lotus
      organizationalUnit - IBM Austin, IBM Endicott, IBM Raleigh, IBM HQ
      
    2. Set up multiple servers, each containing portions of the namespace.

      Figure 2. Setting up the servers

      The Setting up server graphic

      Server descriptions:

      Server A
      A server used to locate other servers in the U.S. With no other knowledge, clients can come here first to locate information for anyone in the U.S.

      Server B
      A hub for all data pertaining to IBM in the U.S. Holds all HQ information directly. Holds all knowledge (referrals) of where other IBM data resides.

      Server C
      Holds all IBM Austin information.

      Server D
      Holds all IBM Endicott information.

      Server E
      Holds all Lotus(R) information.
    3. Set up referral objects to point to the descendants in other servers.

      Figure 3. Server A database (ldif input)

      Server A database graphic displayed here.

      Servers can also define a default referral, which is used to point to a "more knowledgeable" server for anything that is not underneath them in the namespace.

      Note:
      The default referral LDAP Web address does not include the DN portion.

    Following is an arrangement of the same five servers, showing the referral objects in the database as well as the default referrals that are used for superior references.

    Figure 4. Referral example summary

    The Referral example summary graphic displayed here.


    Logging Utilities


    Working with a change log

    The change log records changes (such as schema and entry changes) in the typical LDAP entry structure that can be retrieved through the LDAP API. The change log enables an IBM Directory client application to retrieve a set of changes that have been made to an IBM Directory server database. The client (which might be another IBM Directory server) might then update its own replicated or cached copy of the data.

    Change log configuration

    Because the IBM Directory schema can be changed, it is possible to have any modifications to the schema logged to the change log. Each configuration combination requires different entries in the slapd32.conf file.

    Creating the changelog

    You can use the ldapxcfg or ldapcfg utilities, to automatically create a change log database. Using the ldapxcfg utility, select Create a default directory DB2 database and select Create a database for change log support. Using the ldapcfg command, specify the -g option when configuring your database.

    ldapcfg -l /home/ldapdb2 -o -g
    

    See your Installation and Configuration Guide for more information.

    Before you configure the change log you must identify the suffix that it uses. In the following examples, the suffix for the change log is "cn=changelog". Note that this suffix can be changed.

    After creating the change log database, you must ensure that it has the correct access rights set and configured correctly.

    The following instructions assume that the default LDAP install and configuration parameters were used to configure the directory database, and that the change log database name is "ldapclog".

    For UNIX systems, use the db2 command shell to perform the following commands. These commands assume that the user is logged in as 'root'.

    1. Change user to the ldapdb2 user
      su - ldapdb2
      
    2. Create the changelog database
      db2 create database ldapclog on /home/ldapdb2 using codeset UTF-8 territory US
      
    3. Update the DBHEAP configuration parameter for the database
      db2 update database configuration for ldapclog using DBHEAP 500
      
    4. Return to the 'root" user by pressing Ctrl d

    For Windows systems, use the DB2 Control Center to perform the following commands. These commands assume that the user is logged in as a user that can administer DB2.

    1. Open an instance of the DB2 Control Center by clicking Start->DB2 for Windows NT->Administration Tools->Control Center .
    2. Expand to the databases under the ldapdb2 instance and left click Databases. The current databases are listed.
    3. Right click Databases, move the cursor to create and then click new to create a database. If the message No start database manager command was issued is displayed, start DB2-LDAPDB2 from the NT Services window.
    4. In the Create Database Smartguide window, type the new database name "ldapclog" and click done.
    5. Expand the new database and its Users and Group objects. (Click DB users and your login ID is displayed.)
    6. Right click DB Users and click Add.
    7. In the AddUser pop-up, select ldapdb2 in the User pull down list. In the Authorities panel, give ldapdb2 the right to connect to the database and to create tables. Click apply then close. The User panel now shows ldapdb2 as a user of the ldapclog database.
    8. Right click the ldapclog database, from the popup click Configure to bring up the Configure Database window. Select the performance tab and select the Database heap size parameter. Type 500 for 'value'. Click OK and OK to close the window.
    9. Exit the Control Center.

    To manually create the change log, the following must be added to the slapd32.conf file:

    dn: cn=Change Log, cn=RDBM Backends, cn=IBM SecureWay, cn=Schemas, cn=Configuration
    cn: Change Log
    cn: changelog
    ibm-slapdChangeLogMaxEntries: 0
    ibm-slapdDbConnections: 2
    ibm-slapdDbInstance: ldapdb2
    ibm-slapdDbName: ldapclog
    ibm-slapdDbUserId: ldapdb2
    ibm-slapdDbUserPW: ldapdb2
    ibm-slapdPlugin: database /lib/libback-rdbm.so rdbm_backend_init
    ibm-slapdPlugin: preoperation /usr/ldap/lib/libibmcl.so CLInit cn=changelog
    ibm-slapdReadOnly: FALSE
    ibm-slapdSuffix: cn=changelog
    ibm-slapdUseProcessIdPw: FALSE
    ibm-slapdDbAlias: ldapclgb
    objectClass: top
    objectClass: ibm-slapdRdbmBackend
     
    

    Notes:

    1. The paths and library names vary by platform.

    2. The ibm-slapdDbAlias: ldapclgb entry is needed only for UNIX systems. Do not add this entry if you are using a Windows system.

    Logging schema changes

    The IBM Directory slapd32.conf file contains a stanza that defines schema configuration. For example:

    dn: cn=SchemaDB,cn=LDCF Backends,cn=IBM
    SecureWay,cn=Schemas,cn=Configuration 
    objectclass: top 
    objectclass: ibm-slapdLdcfBackend 
    cn: SchemaDB 
    ibm-slapdSuffix:  cn=schema 
    

    To enable schema updates to be shadowed to the change log, the preceding stanza is changed to:

    dn: cn=SchemaDB,cn=LDCF Backends,cn=IBM
    SecureWay,cn=Schemas,cn=Configuration 
    objectclass: top 
    objectclass: ibm-slapdLdcfBackend 
    cn: SchemaDB 
    ibm-slapdPlugin:  database /bin/libcl.dll CLInit cn=changelog 
    ibm-slapdSuffix:  cn=schema 
    

    Note the additional line. The last parameter in this line, "cn=changelog" tells the IBM Directory server which change log database it must log schema changes to. Configuration of this change log database is discussed in the next section. For AIX operating systems, replace .dll to .a in the library names.

    Multiple database configuration

    The IBM Directory logs changes to a separate database. Besides the database that holds the actual data, changelog uses another database to store changes. In the change log stanza of the slapd32.conf file, the name of the second database is ldapclog:

    dn: cn=Change Log,cn=RDBM Backends,cn=IBM
    SecureWay,cn=Schemas,cn=Configuration 
    objectclass: top 
    objectclass: ibm-slapdRdbmBackend 
    cn: Directory 
    ibm-slapdPlugin:  database /lib/libback-rdbm.sl rdbm_backend_init 
    ibm-slapdSuffix:  cn=changelog 
    ibm-slapdDbName:  ldapclog 
    ibm-slapdDbUserPW:  <db2userpw> 
    ibm-slapdDbUserID:  db2user 
     
    

    Notes:

    1. As with the Directory entry, ensure that the ibm-slapdDbUserPW is all one line (make sure carriage return or line feeds are not inserted in the password).

    2. Database path names and library extensions are platform dependent.

    Change log access control

    The change log can be accessed through normal mechanisms as the primary tree. However, the directory entry the client binds as does not exist in the change log directory tree. This is more a statement of policy, because the entry can exist in the change log database. Administration of the changelog database is easier, however, if no bind entries are contained in it.

    After entries that are allowed to access the change log are identified, the ACLs for the root level of the change log tree need to be changed (to enable users to have full read, search and compare privileges for the tree or subtree). Do not configure anonymous access for your change log tree, do not grant write or delete access to the tree. This needs to be done separately for each change log database in the system.

    Note:
    Access to the change log gives access to all changed entries in the shadowed directory, even if permissions are restricted on the shadowed directory.

    Change log expiration of entries

    You can limit the number of entries the change log can hold by using the "changelogmaxentries <integer>" value, which is the maximum number of entries in the change log that can be set. The values can be 0 to the maximum integer. This value is defined in the Changelog entry where the change log database is defined: .

    dn: cn=Change Log,cn=RDBM Backends,cn=IBM
    SecureWay,cn=Schemas,cn=Configuration 
    objectclass: top 
    objectclass: ibm-slapdRdbmBackend 
    cn: Directory 
    ibm-slapdPlugin:  database /bin/libback-rdbm.dll rdbm_backend_init 
    ibm-slapdSuffix:  cn=changelog 
    ibm-slapdDbName:  ldapclog 
    ibm-slapdDbUserPW:  xxx 
    ibm-slapdDbUserID:  db2user 
    ibm-slapdChangeLogMaxEntries 5000 
    

    In this instance the maximum number of entries the change log can hold is 5000. The default is to have no limitation.

    Change log schema

    In this release of the IBM Directory an object class ("changeLogEntry") is used to represent changes applied to an IBM Directory server. It also suggests a common location for a container that can hold these objects. The client might update its local copy of directory information by reading the entries within the container and then applying any changes to its local database.

    The location of the container that holds "changeLogEntry" objects is obtained by reading the "changeLog" attribute of the root DSE of a server. For example, if the root of the container is "cn=changelog", then the root DSE must have an attribute named "changeLog" with the value "cn=changelog".

    Change log object class

    changeLogEntry
    The "changeLogEntry" object class is used to represent changes made to a directory server. The set of changes is given by the ordered set of all entries within the change log container as defined by "changeNumber". The change log information can have entries added and deleted.

    ibm-changelog
    The ibm-changelog object class is an IBM extension to changeLogEntry to include ibm-changeInitiatorsName attribute.

    changeLogEntry attributes

    ibm-changeInitiatorsName
    The DN of the entity that initiated the change. Syntax: 1.3.6.1.4.1.1466.115.121.1.12. Value: single-valued. Usage: userApplications

    changeNumber
    The change number as assigned by the supplier. This integer must increase as new entries are added, and always be unique within a given server. Syntax: INTEGER

    targetdn
    The distinguished name of the entry which was added, modified, or deleted. In the case of a "modrdn" operation, the targetdn gives the DN of the entry before it was modified. Syntax: DN

    changeType
    The type of change ("add", "delete", "modify", or "modrdn"). Syntax: DirectoryString

    changes
    The changes that were made to the directory server. These changes are in LDIF format. See Ldif utility for additional information about the ldif command utility.

    newRDN
    The new RDN (Relative Distinguished Name) of the entry, if the changeType is "modrdn". If the changeType attribute does not have the "modrdn" value then there are no values contained in the newRDN attribute. Syntax: DN

    deleteOldRDN
    A flag which tells whether the old RDN of the entry should either be retained as a distinguished attribute of the entry or deleted. Syntax: BOOLEAN

    newSuperior
    If present, it gives the name of the entry (which becomes the immediate superior of the existing entry). Syntax: DN

    changeTime
    The time when the change was made. Syntax: Generalized Time

    modifiersName
    The DN making the change. Syntax: DirectoryString

    changelogmaxentries
    Identifies the maximum number of entries in the change log file. Syntax: INT
    Note:
    Bind DNs are restricted to the Admin DN and to a DN explicitly determined by the IBM Directory administrator during configuration.

    Examples using the ldapsearch command

    Example 1: This example using the ldapsearch command retrieves all change log entries that are recording add operations:

     ldapsearch -b "cn=changelog" "(changetype=add)"
     
     changenumber=10,cn=changelog
     objectclass=top
     objectclass=changelogentry
     changenumber=10
     targetdn=cn=David Campbell, ou=Widget Division, ou=Austin, o=IBM_US, c=US
     changetime=19990412160345
     changetype=add
     changes=objectclass: organizationalPerson
     telephonenumber: 1-812-855-7509
     internationalisdnnumber: 755-7509
     title: Mfg. Assembly
     seealso: cn=Mary Burnnet, ou=Widget Division, ou=Austin, o=IBM_US, c=US
     postalcode: 1514
     cn: David Campbell
    

    Example 2: This search example retrieves all delete changes where the changenumber attribute is greater than or equal to 5:

     ldapsearch -b "cn=changelog" "(& (changetype=delete)(changenumber>=5))"
     
     changenumber=9,cn=changelog
     objectclass=top
     objectclass=changelogentry
     changenumber=9
     targetdn=cn=david campbell,ou=widget division,ou=austin,o=ibm_us,c=us
     changetime=19990412160331
     changetype=delete
    

    Example 3: This search example retrieves all modify operations, where the changetime attribute is greater than 199904141915000:

    ldapsearch -b "cn=changelog" "(&(changetype=modify)(changetime>=199904141915000))"
     
     changenumber=32,cn=changelog
     objectclass=top
     objectclass=changelogentry
     changenumber=32
     targetdn=cn=bowling team,ou=groups,o=ibm_us,c=us
     changetime=19990414191505
     changetype=modify
     changes=NOT ASCII
     
     changenumber=33,cn=changelog
     objectclass=top
     objectclass=changelogentry
     changenumber=33
     targetdn=cn=bowling team,ou=groups,o=ibm_us,c=us
     changetime=19990414191741
     changetype=modify
     changes=NOT ASCII
     
     changenumber=34,cn=changelog
     objectclass=top
     objectclass=changelogentry
     changenumber=34
     targetdn=cn=bowling team,ou=groups,o=ibm_us,c=us
     changetime=19990414191842
     changetype=modify
     changes=NOT ASCII
    

    Examples of the changeLogEntry Object Class

    Example 1: A changeLogEntry representing the addition of a new entry to the directory:

    dn: changenumber=1923, cn=changelog
     changenumber: 1923
     targetdn: cn=Barbara Johnson, ou=Accounting, o=Ace Industry, c=US
     changetype: add
     changes: cn: Barbara Johnson\ncn: Babs Johnson\nsn: Johnson\n
        givenname: Barbara\ntelephonenumber: +1 212 555-1212\nmail: babs@ace.com\n
        objectclass: top\nobjectclass: person\nobjectclass: organizationalPerson\n
        objectclass: inetOrgPerson
    

    Example 2: A changeLogEntry representing the deletion of an entry from the directory:

    dn: changenumber=2933, cn=changelog
     changenumber: 2933
     targetdn: cn=Gern Johnson, ou=Product Testing, o=Ace Industry, c=US
     changetype: delete
    

    Example 3: A changeLogEntry representing the modification of an entry in the directory:

    dn: changenumber=5883, cn=changelog
     changenumber: 5883
     targetdn: cn=Bjorn Johnson, ou=Product Development, o=Ace Industry, c=US
     changetype: modify
     changes: delete: telephonenumber\ntelephonenumber: 1212\n-\n
           add: telephonenumber\ntelephonenumber: +1 212 555 1212\n-
    

    Example 4: A changeLogEntry representing a modrdn operation performed on an entry in the directory:

    dn: changenumber=10042, cn=changelog
     changenumber: 10042
     
     targetdn: cn=Bjorn Johnson, ou=Product Development, o=Ace Industry, c=US
     changetype: modrdn
     newrdn: cn=Bjorn J Johnson
     deleteoldrdn: FALSE
    

    Working with Administration Utilities

    Using the change log facility affects the administration utilities in the following way:

    Unconfiguring changelog

    To unconfigure the changelog you can use the ldapucfg command with the -g option or you can either remove or comment out the changelog stanzas.

    #dn: cn=Change Log,cn=RDBM Backends,cn=IBM
    #SecureWay,cn=Schemas,cn=Configuration 
    #objectclass: top 
    #objectclass: ibm-slapdRdbmBackend 
    #cn: Directory 
    #ibm-slapdPlugin:  database /bin/libback-rdbm.dll rdbm_backend_init 
    #ibm-slapdSuffix:  cn=changelog 
    #ibm-slapdDbName:  cldb2 
    #ibm-slapdDbUserPW:  xxx 
    #ibm-slapdDbUserID:  db2user 
     
    
    Note:
    Although not recommended, you can use the Directory Management Tool to modify change log entries. The behavior of the operations is the same as those for directory entries. See Working with directory entries for a descriptions of the various operations.

    Audit Logging

    Audit logging is used to improve the security of the directory server. A default audit plug-in is provided with the server. Depending on the audit configuration parameters, this plug-in might log an audit entry in the default or specified audit log for each LDAP operation the server processed. The system administrator can use the activities stored in the audit log to check for suspicious patterns of activity in an attempt to detect security violations. If security is violated, the audit log can be used to determine how and when the problem occurred and perhaps the amount of damage done. This information is very useful, both for recovery from the violation and, possibly, in the development of better security measures to prevent future problems. You can also write your own audit plug-ins to either replace, or add more processing to, the default audit plug-in.

    Enabling the audit log

    To enable audit logging:

    1. If you have not done so already, click the arrow to the left of Logs in the navigation area, click Audit log, then click Settings.
    2. Select Yes for Enable audit logging.
    3. Enter the Path and file name for the audit log.
    4. Select the operations you wish to log. Consult the field help for additional information about the various operations you can log.
    5. Select to either log Only failed attempts at the selected operations or to log All attempts at the selected operations.
    6. Click Update.

    Disabling the audit log

    To disable audit logging:

    1. If you have not done so already, click the arrow to the left of Logs in the navigation area, click Audit log, then click Settings.
    2. Select No for Enable audit logging.
    3. Click Update.

    Viewing the audit log

    The audit log displays log entries chronologically. Each non-message entry contains a general information header followed by operation-specific data. For example,

    2000-03-23-16:01:01.345-06:00--V3 Bind--bindDN:Y249bWFuYWdlcg0K
       --client:9.1.2.3:12345--
    ConnectionID:12--received:2000-03-23-16:01:01.330-06:00
       --success name: Y249bWFuYWdlcg0K 
    authenticationChoice: simple
     
    

    The header is in the following format:

    Timestamp 1 "--"
    The local time the entry is logged, that is, the time the request was processed. The timestamp is in the format YYYY-MM-DD-HH:MM:SS.mmm=(or-)HH:MM. The =(or=)HH:MM is UTC offset. mmm is milliseconds.

    Version number+[SSL]+[unauthenticated or anonymous] Operation "--"
    Shows the LDAP request that was received and processed. Version number is either V2 or V3. SSL displays only when SSL was used for the connection. unauthenticated or anonymous displays to indicate whether the request was from an unauthenticated or anonymous client. Neither unauthenticated or anonymous display if the request is from an authenticated client.

    bindDN: server encoded DN string "--"
    Shows the Bind DN. The encoding done by the server is to hide the DN from trivial viewing. The server provides a decoding function through an LDAP search of special audit related attributes. For V3 unauthenticated or anonymous requests, this field is not shown.

    client:Client IP address:Port number "--"
    Shows the client IP address and port number.

    ConnectionID: xxxx "--"
    Is used to group all the entries received in the same connection, meaning between the bind and unbind, together.

    received: Timestamp 2 "--"
    Is the local time when the request was received, or to be more specific, the beginning time when the request was processed. Its format is the same as Timestamp 1.

    Result or Status string
    Shows the result or status of the LDAP operation. For the result string, the textual form of the LDAP resultCode will be logged, for example, success or operationsError, instead of 0 or 1.

    Operation-specific data follows the header and displays operation-specific data, for example,

    Use the following procedures to view the audit log:

    Using Server Administration:

    1. If you have not done so already, click the arrow to the left of Logs in the navigation area, then click the arrow to the left of Audit log, then click View
    2. You can:

    Using the command line - required for the Linux and HP-UX operating systems:

    To view the error log issue the following command:

    more /var/ldap/audit
    

    where /var/ldap/audit is your error log.

    Note:
    /var/ldap/audit is the default audit log for UNIX systems and installpath\var\audit is the default audit log for Windows systems.

    Enabling error logging

    To enable error logging:

    1. If you have not done so already, click the arrow to the left of Logs in the navigation area, click the arrow to the left of Error log, then click Settings.
    2. Enter the Path and file name for the error log. Ensure that the file exists on the ldap server and that the path is valid. The path and file name for the error log. The error log can also be directed to something other than a file, for example, a line printer.
      Note:
      If you are using a Windows operating systems, you can only view the error log using Server Administration if the output file is located in the ldap install tree. If you specify a file in the ldap install tree that is not an acceptable file name (for example, invalid syntax or if the server does not have the rights to create and/or modify the file), the attempt will fail with the following error: LDAP Server is unwilling to perform the operation.
      Validity checking is limited to files within the ldap install tree. If you specify anything other than a file located in the ldap install tree, the value is always accepted as valid.
    3. Select either Low, Medium, or High for the level of error logging.
    4. Click Update.
    5. You must restart the server using the Restart icon in the upper right corner for the changes to take effect

    Viewing the error log

    Use the following procedures to view the error log.

    Using Server Administration:

    1. If you have not done so already, click the arrow to the left of Logs in the navigation area, then click the arrow to the left of Error log, then click View
    2. You can:

    Using the command line - required for the Linux and HP-UX operating systems:

    To view the error log issue the following command:

    more /tmp/slapd.errors
    

    where tmp/slapd.errors is your error log.

    Note:
    tmp/slapd.errors is the default error log for UNIX systems and installpath\tmp\slapd.errors is the default error log for Windows systems.

    Event notification

    The event notification function allows a server to notify a registered client that an entry in the directory tree has been changed, added or deleted. This notification is in the form of an unsolicited message.

    When an event occurs, the server sends a message to the client as an LDAP v3 unsolicited notification. The messageID is 0 and the message is in the form of an extended operation response. The responseName field is set to the registration OID. The response field contains the unique registration ID and a timestamp for when the event occurred. The time field is in UTC Time format.

    Note:
    When a transaction occurs, the event notifications for the transaction steps cannot be sent until the entire transaction is completed.

    Enabling event notification

    To enable event notification:

    1. If you have not done so already, click the arrow to the left of Settings in the navigation area, then click Event notification.
    2. Select Yes for Enable event notification.
    3. Select the Maximum registrations per connection. This selection sets how many registrations a client can have over a single connection at one time. Unlimited allows unlimited registrations per connection. Specifying a number allows that number of registrations. The default value is 100 registrations.
    4. Select the Maximum registrations total. This selection sets how many registrations the server can have at any one time. Unlimited allows unlimited registrations per connection. Specifying a number allows that number of total registrations. The default value is unlimited.
    5. Click Update.
    6. You must restart the server using the Restart icon in the upper right corner for the changes to take effect.

    Disabling event notification

    To disable event notification:

    1. If you have not done so already, click the arrow to the left of Settings in the navigation area, then click Event notification.
    2. Select No for Enable event notification.
    3. Click Update.

    See the IBM Directory Server Version 4.1 C-Client SDK Programming Reference for more information about event notification.


    Transaction Support

    Transaction processing enables an application to group a set of entry updates together in one operation. Normally each individual LDAP operation is treated as a separate transaction with the database. Grouping operations together is useful when one operations is dependent on another operations because if one of the operations fails, the entire transaction fails. Transaction settings determine the limits on the transaction activity allowed on the server.


    Enabling transaction support

    To enable transaction processing:

    1. If you have not done so already, click the arrow to the left of Settings in the navigation area, then click Transactions.
    2. Select Yes for Enable transaction processing.
    3. Select the Maximum number of transactions. This is the maximum number of concurrent transactions allowed by the server. The default is 20 transactions.
    4. Select the Maximum number of operations per transaction. This selection sets the maximum number of update operations within a transaction. The smaller the number, the better the performance. The default is 5 operations.
    5. Select the Pending time limit. This selection sets the maximum timeout value of a pending transaction in seconds. Transactions left uncompleted for longer than this time are cancelled (rolled back). The default is 300 seconds.
    6. Click Update.
    7. You must restart the server using the Restart icon in the upper right corner for the changes to take effect.

    Disabling transaction support

    To disable transaction processing:

    1. If you have not done so already, click the arrow to the left of Settings in the navigation area, then click Transactions.
    2. Select No for Enable transaction processing.
    3. Click Update.
    4. You must restart the server using the Restart icon in the upper right corner for the changes to take effect.

    See the IBM Directory Server Version 4.1 C-Client SDK Programming Reference for more information about transaction support.


    Command line utilities

    This section describes the utilities that can be run from a command prompt.

    Client Utilities

    Server Utilities

    The ldapdelete, ldapmodify, ldapadd, ldapmodrdn, and ldapsearch utilities all use the ldap_bind API. When bind is invoked, several results can be returned. Following are bind results using various combinations of user IDs and passwords.


    Client utilities

    This section provides a description of the client utilities. They are also documented in "Chapter 2. Ldap Utilities" in the IBM Directory Server Version 4.1: Client SDK Programming Reference.

    LDAPMODIFY, LDAPADD

    LDAP modify-entry and LDAP add-entry tools

    Synopsis

    ldapmodify [-a] [-b] [-c] [-C charset] [-d debuglevel][-D binddn][-f file] 
    [-h ldaphost] [-K keyfile] [-m mechanism] [-M] [-n] [-N certificatename]
    [-O hopcount] [-p ldapport] [-P keyfilepw] [-r] [-R] [-v] [-V] 
    [-w passwd | ?] [-Z]
     
     
    ldapadd [-b] [-c]  [-d debuglevel][-D binddn][-f file] [-h ldaphost] 
    [-K keyfile]  [-M] [-n] [-N certificatename] [-p ldapport] [-P keyfilepw] 
    [-r] [-R] [-v] [-V] 
    [-w passwd | ?] [-Z]
     
     
    

    Description

    ldapmodify is a command-line interface to the ldap_modify and ldap_add library calls. ldapadd is implemented as a renamed version of ldapmodify. When invoked as ldapadd, the -a (add new entry) flag is turned on automatically.

    ldapmodify opens a connection to an LDAP server, and binds to the server. You can use ldapmodify to modify or add entries. The entry information is read from standard input or from file through the use of the -f option.

    To display syntax help for ldapmodify or ldapadd, type

    ldapmodify -?
    

    or

    ldapadd -?
    

    Options

    -a
    Add new entries. The default action for ldapmodify is to modify existing entries. If invoked as ldapadd, this flag is always set.

    -b
    Assume that any values that start with a `/' are binary values and that the actual value is in a file whose path is specified in place of the valuer.

    -c
    Continuous operation mode. Errors are reported, but ldapmodify continues with modifications. Otherwise he default action is to exit after reporting an error.

    -C charset
    Specifies that strings supplied as input to the ldapmodify and ldapadd utilities are represented in a local character set as specified by charset, and must be converted to UTF-8. When the ldapmodify and ldapadd records are received from standard input, the specified charset value is used to convert the attribute values that are designated as strings that is, the attribute types are followed by a single colon. If the records are received from an LDIF file that contains a charset tag, the charset tag in the LDIF file overrides the charset value specified on the command-line. See IANA Character Sets Supported by Platform for the specific charset values that are supported for each operating system platform. Note that the supported values for charset are the same values supported for the charset tag that is optionally defined in Version 1 LDIF files.

    -d debuglevel
    Set the LDAP debugging level to debuglevel. See Server Debug Mode for information about debug levels.

    -D binddn
    Use binddn to bind to the LDAP directory. binddn is a string-represented DN.

    -f file
    Read the entry modification information from an ldif file instead of from standard input. If an ldif file is not specified, you must use standard input to specify the update records in ldif format.

    -h ldaphost
    Specify an alternate host on which the ldap server is running.

    -K keyfile
    Specify the name of the SSL key database file with default extension of kdb. If the key database file is not in the current directory, specify the fully-qualified key database filename. If a key database filename is not specified, this utility will first look for the presence of the SSL_KEYRING environment variable with an associated filename. If the SSL_KEYRING environment variable is not defined, the default keyring file will be used, if present.

    A default keyring file that is, ldapkey.kdb, and the associated password stash file that is, ldapkey.sth, are installed in the /lib directory under LDAPHOME, where LDAPHOME is the path to the installed LDAP support. LDAPHOME varies by operating system platform:

    See the IBM Directory C-Client SDK Programming Reference for more information about default key database files, and default Certificate Authorities.

    If a keyring database file cannot be located, a "hard-coded" set of default trusted certificate authority roots is used. The key database file typically contains one or more certificates of certificate authorities (CAs) that are trusted by the client. These types of X.509 certificates are also known as trusted roots. For more information on managing an SSL key database, see Appendix B, Using gsk5ikm. Also see the SSL Notes and Secure Sockets Layer for more information about SSL and certificates.

    This parameter effectively enables the -Z switch.

    -m mechanism
    Use mechanism to specify the SASL mechanism to be used to bind to the server. The ldap_sasl_bind_s() API is used. The -m parameter is ignored if -V 2 is set. If -m is not specified, simple authentication is used.

    -M
    Manage referral objects as regular entries.

    -n
    Show what would be done, but don't actually modify entries. Useful for debugging in conjunction with -v.

    -N certificatename
    Specify the label associated with the client certificate in the key database file. If the LDAP server is configured to perform server authentication only, a client certificate is not required. If the LDAP server is configured to perform client and server Authentication, a client certificate might be required. certificatename is not required if a default certificate/private key pair has been designated as the default. Similarly, certificatename is not required if there is a single certificate/private key pair in the designated key database file. This parameter is ignored if neither -Z nor -K is specified.

    -O hopcount
    Specify hopcount to set the maximum number of hops that the client library takes when chasing referrals. The default hopcount is 10.

    -p ldapport
    Specify an alternate TCP port where the ldap server is listening. The default LDAP port is 389. If -p is not specified and -Z is specified, the default LDAP SSL port 636 is used.

    -P keyfilepw
    Specify the key database password. This password is required to access the encrypted information in the key database file, which might include one or more private keys. If a password stash file is associated with the key database file, the password is obtained from the password stash file, and the -P parameter is not required. This parameter is ignored if neither -Z nor -K is specified.

    -r
    Replace existing values by default.

    -R
    Specifies that referrals are not to be automatically followed.

    -v
    Use verbose mode, with many diagnostics written to standard output.

    -V
    Specifies the LDAP version to be used by ldapmodify when it binds to the LDAP server. By default, an LDAP V3 connection is established. To explicitly select LDAP V3, specify -V 3. Specify -V 2 to run as an LDAP V2 application. An application, like ldapmodify, selects LDAP V3 as the preferred protocol by using ldap_init instead of ldap_open.

    -w passwd | ?
    Use passwd as the password for authentication. Use the ? to generate a password prompt. Using this prompt prevents your password from being visible through the ps command.

    -Z
    Use a secure SSL connection to communicate with the LDAP server. The -Z option is only supported when the SSL component entry, as provided by IBM's GSKit, is installed.

    Input format

    The contents of file (or standard input if no -f flag is given on the command line) should conform to the ldif format.

    Alternative input format

    An alternative input format is supported for compatibility with older versions of ldapmodify. This format consists of one or more entries separated by blank lines, where each entry looks like the following:

    Distinguished Name (DN)
     
    attr=value
     
    [attr=value ...]
    

    where attr is the name of the attribute and value is the value.

    By default, values are added. If the -r command line flag is given, the default is to replace existing values with the new one. It is permissible for a given attribute to appear more than once, for example, to add more than one value for an attribute. Also note that you can use a trailing `\\' to continue values across lines and preserve new lines in the value itself. This is useful for modifying QUIPU iattr attributes among others.

    attr should be preceded by a - to remove a value. The = and value should be omitted to remove an entire attribute.

    attr should be preceded by a + to add a value in the presence of the -r flag.

    Examples

    Assuming that the file /tmp/entrymods exists and has the following contents:

    dn: cn=Modify Me, o=University of Higher Learning, c=US
     
          changetype: modify
     
          replace: mail
     
          mail: modme@student.of.life.edu
     
          -
     
          add: title
     
          title: Grand Poobah
     
          -
     
          add: jpegPhoto
     
          jpegPhoto: /tmp/modme.jpeg
     
          -
     
          delete: description
     
          -
     
     
     
    

    the command:

    ldapmodify -b -r -f /tmp/entrymods 
    

    will replace the contents of the Modify Me entry's mail attribute with the value modme@student.of.life.edu, add a title of Grand Poobah, and the contents of the file /tmp/modme.jpeg as a jpegPhoto, and completely remove the description attribute. These same modifications can be performed using the older ldapmodify inout format:

    cn=Modify Me, o=University of Higher Learning, c=US
     
          mail=modme@student.of.life.edu
     
          +title=Grand Poobah
     
          +jpegPhoto=/tmp/modme.jpeg
     
          -description
     
     
    

    and the command:

    ldapmodify -b -r -f /tmp/entrymods 
    

    Assuming that the file /tmp/newentry exists and has the following contents:

    dn: cn=John Doe, o=University of Higher Learning, c=US
     
          objectClass: person
     
          cn: John Doe
     
          cn: Johnny
     
          sn: Doe
     
          title: the world's most famous mythical person
     
          mail: johndoe@student.of.life.edu
     
          uid: jdoe
     
     
     
    

    the command:

     ldapadd -f /tmp/entrymods
    

    adds a new entry for John Doe, using the values from the file /tmp/newentry.

    Assuming that the file /tmp/newentry exists and has the contents:

    dn: cn=John Doe, o=University of Higher Learning, c=US
            
    changetype: delete
    

    the command:

     ldapmodify -f /tmp/entrymods
    

    removes John Doe's entry.

    Notes

    If entry information is not supplied from file through the use of the -f option, the ldapmodify command will wait to read entries from standard input. To break out of the wait, use Ctrl+C or Ctrl+D.

    SSL Notes

    To use the SSL-related functions associated with this utility, the SSL libraries and tools must be installed. The SSL libraries and tools are provided with IBM's Global Security Kit (GSKit), which includes security software developed by RSA Security Inc.

    Note:
    For information regarding the use of 128-bit and triple DES encryption by LDAP applications, including the LDAP sample programs, see "LDAP_SSL" in the IBM Directory C-Client SDK Programming Reference. This section describes the steps required to build the sample programs and your applications so they can use SSL with the strongest encryption algorithms available.
    See the makefile associated with the sample programs for more information on linking an LDAP application so that it has access to 128-bit and triple-DES encryption algorithms.

    The content of a client's key database file is managed with the gsk5ikm utility. For more information on this Java utility, see Appendix B, Using gsk5ikm. The gsk5ikm utility is used to define the set of trusted certification authorities (CAs) that are to be trusted by the client. By obtaining certificates from trusted CAs, storing them in the key database file, and marking them as 'trusted', you can establish a trust relationship with LDAP servers that use 'trusted' certificates issued by one of the trusted CAs. The gsk5ikm utility can also be used to obtain a client certificate, so that client and server authentication can be performed.

    If the LDAP servers accessed by the client use server authentication only, it is sufficient to define one or more trusted root certificates in the key database file. With server authentication, the client can be assured that the target LDAP server has been issued a certificate by one of the trusted CAs. In addition, all LDAP transactions that flow over the SSL connection with the server are encrypted including the LDAP credentials that are supplied on the ldap_bind or ldap_simple_bind_s. For example, if the LDAP server is using a high-assurance VeriSign certificate, you should obtain a CA certificate from VeriSign, import it into your key database file, and mark it as trusted. If the LDAP server is using a self-signed server certificate, the administrator of the LDAP server can supply you with a copy of the server's certificate request file. Import the certificate request file into your key database file and mark it as trusted.

    If the LDAP servers accessed by the client use client and server authentication, it is necessary to:

    Diagnostics

    Exit status is 0 if no errors occur. Errors result in a non-zero exit status and a diagnostic message being written to standard error.

    See also

    ldapdelete, ldapmodrdn, ldapsearch

    LDAPDELETE

    LDAP delete-entry tool

    Synopsis

    ldapdelete [-b searchbase] [-c] [-C charset] [-d debuglevel][-D binddn][-f file] 
    [-h ldaphost] [-K keyfile] [-m mechanism] [-M] [-n] [-N certificatename]
    [-O hopcount] [-p ldapport] [-P keyfilepw]  [-R] [-v] [-V] 
    [-w passwd | ?] [-Z] [dn]...
         
    

    Description

    ldapdelete is a command-line interface to the ldap_delete library call.

    ldapdelete opens a connection to an LDAP server, binds, and deletes one or more entries. If one or more Distinguished Name (DN) arguments are provided, entries with those DNs are deleted. Each DN is a string-represented DN. If no DN arguments are provided, a list of DNs is read from standard input, or from file if the -f flag is used.

    To display syntax help for ldapdelete, type:

    ldapdelete -?
    

    .

    Options

    -b searchbase
    Use searchbase as the starting point for the search instead of the default. If -b is not specified, this utility examines the LDAP_BASEDN environment variable for a searchbase definition.

    -c
    Continuous operation mode. Errors are reported, but ldapdelete continues with modifications. Otherwise he default action is to exit after reporting an error.

    -C charset
    Specifies that the DNs supplied as input to the ldapdelete utility are represented in a local character set, as specified by charset. Use -C charset to override the default, where strings must be supplied in UTF-8. See IANA Character Sets Supported by Platform for the specific charset values that are supported for each operating system platform. Note that the supported values for charset are the same values supported for the charset tag that is optionally defined in Version 1 LDIF files.

    -d debuglevel
    Set the LDAP debugging level to debuglevel. See Server Debug Mode for information about debug levels.

    -D binddn
    Use binddn to bind to the LDAP directory. binddn is a string-represented DN.

    -f file
    Read a series of lines from file, performing one LDAP delete for each line in the file. Each line in the file should contain a single distinguished name.

    -h ldaphost
    Specify an alternate host on which the ldap server is running.

    -K keyfile
    Specify the name of the SSL key database file with default extension of kdb. If the key database file is not in the current directory, specify the fully-qualified key database filename. If a key database filename is not specified, this utility will first look for the presence of the SSL_KEYRING environment variable with an associated filename. If the SSL_KEYRING environment variable is not defined, the default keyring file will be used, if present.

    A default keyring file that is, ldapkey.kdb, and the associated password stash file that is, ldapkey.sth, are installed in the /lib directory under LDAPHOME, where LDAPHOME is the path to the installed LDAP support. LDAPHOME varies by operating system platform:

    See IBM Directory C-Client SDK Programming Reference for more information about default key database files, and default Certificate Authorities.

    If a keyring database file cannot be located, a "hard-coded" set of default trusted certificate authority roots is used. The key database file typically contains one or more certificates of certificate authorities (CAs) that are trusted by the client. These types of X.509 certificates are also known as trusted roots. For more information on managing an SSL key database, see Appendix B, Using gsk5ikm. Also see the SSL Notes and Secure Sockets Layer for more information about SSL and certificates.

    This parameter effectively enables the -Z switch.

    -m mechanism
    Use mechanism to specify the SASL mechanism to be used to bind to the server. The ldap_sasl_bind_s() API will be used. The -m parameter is ignored if -V 2 is set. If -m is not specified, simple authentication is used.

    -M
    Manage referral objects as regular entries.

    -n
    Show what would be done, but don't actually modify entries. Useful for debugging in conjunction with -v.

    -N certificatename
    Specify the label associated with the client certificate in the key database file. If the LDAP server is configured to perform server authentication only, a client certificate is not required. If the LDAP server is configured to perform client and server Authentication, a client certificate might be required. certificatename is not required if a default certificate/private key pair has been designated as the default. Similarly, certificatename is not required if there is a single certificate/private key pair in the designated key database file. This parameter is ignored if neither -Z nor -K is specified.

    -O hopcount
    Specify hopcount to set the maximum number of hops that the client library takes when chasing referrals. The default hopcount is 10.

    -p ldapport
    Specify an alternate TCP port where the ldap server is listening. The default LDAP port is 389. If -p is not specified and -Z is specified, the default LDAP SSL port 636 is used.

    -P keyfilepw
    Specify the key database password. This password is required to access the encrypted information in the key database file, which may include one or more private keys. If a password stash file is associated with the key database file, the password is obtained from the password stash file, and the -P parameter is not required. This parameter is ignored if neither -Z nor -K is specified.

    -R
    Specifies that referrals are not to be automatically followed.

    -v
    Use verbose mode, with many diagnostics written to standard output.

    -V
    Specifies the LDAP version to be used by ldapdelete when it binds to the LDAP server. By default, an LDAP V3 connection is established. To explicitly select LDAP V3, specify -V 3. Specify -V 2 to run as an LDAP V2 application. An application, like ldapdelete, selects LDAP V3 as the preferred protocol by using ldap_init instead of ldap_open.

    -w passwd | ?
    Use passwd as the password for authentication. Use the ? to generate a password prompt. Using this prompt prevents your password from being visible through the ps command.

    -Z
    Use a secure SSL connection to communicate with the LDAP server. The -Z option is only supported when the SSL component entry, as provided by IBM's GSKit, is installed.

    -dn
    Specifies one or more DN arguments. Each DN should be a string-represented DN.

    Examples

    The following command,

    ldapdelete "cn=Delete Me, o=University of Life, c=US"
    

    attempts to delete the entry named with commonName "Delete Me" directly below the University of Life organizational entry. It might be necessary to supply a binddn and passwd for deletion to be allowed (see the -D and -w options).

    Notes

    If no DN arguments are provided, the ldapdelete command waits to read a list of DNs from standard input. To break out of the wait, use Ctrl+C or Ctrl+D.

    SSL Notes

    To use the SSL-related functions associated with this utility, the SSL libraries and tools must be installed. The SSL libraries and tools are provided with IBM's Global Security Kit (GSKit), which includes security software developed by RSA Security Inc.

    Note:
    For information regarding the use of 128-bit and triple DES encryption by LDAP applications, including the LDAP sample programs, see "LDAP_SSL" in the IBM Directory C-Client SDK Programming Reference. This section describes the steps required to build the sample programs and your applications so they can use SSL with the strongest encryption algorithms available.
    See the makefile associated with the sample programs for more information on linking an LDAP application so that it has access to 128-bit and triple-DES encryption algorithms.

    The content of a client's key database file is managed with the gsk5ikm utility. For more information on this Java utility, see Appendix B, Using gsk5ikm. The gsk5ikm utility is used to define the set of trusted certification authorities (CAs) that are to be trusted by the client. By obtaining certificates from trusted CAs, storing them in the key database file, and marking them as 'trusted', you can establish a trust relationship with LDAP servers that use 'trusted' certificates issued by one of the trusted CAs. The gsk5ikm utility can also be used to obtain a client certificate, so that client and server authentication can be performed.

    If the LDAP servers accessed by the client use server authentication only, it is sufficient to define one or more trusted root certificates in the key database file. With server authentication, the client can be assured that the target LDAP server has been issued a certificate by one of the trusted CAs. In addition, all LDAP transactions that flow over the SSL connection with the server are encrypted including the LDAP credentials that are supplied on the ldap_bind or ldap_simple_bind_s. For example, if the LDAP server is using a high-assurance VeriSign certificate, you should obtain a CA certificate from VeriSign, import it into your key database file, and mark it as trusted. If the LDAP server is using a self-signed server certificate, the administrator of the LDAP server can supply you with a copy of the server's certificate request file. Import the certificate request file into your key database file and mark it as trusted.

    If the LDAP servers accessed by the client use client and server authentication, it is necessary to:

    Diagnostics

    Exit status is 0 if no errors occur. Errors result in a non-zero exit status and a diagnostic message being written to standard error.

    See also

    ldapadd ,ldapmodify, ldapmodrdn, ldapsearch,

    LDAPMODRDN

    LDAP modify-entry RDN tool

    Synopsis

    ldapmodrdn [-c] [-C charset] [-d debuglevel][-D binddn] [-f file]
    [-h ldaphost] [-K keyfile] [-m mechanism] [-M] [-n] [-N certificatename]
    [-O hopcount] [-p ldapport] [-P keyfilepw] [-r] [-R] [-v] [-V] 
    [-w passwd | ?] [-Z] [dnrdn]
      
    

    Description

    ldapmodrdn is a command-line interface to the ldap_modrdn library call.

    ldapmodrdn opens a connection to an LDAP server, binds, and modifies the RDN of entries. The entry information is read from standard input, from file through the use of the - f option, or from the command-line pair dn and rdn.

    See LDAP Distinguished Names for information about RDNs (Relative Distinguished Names) and DNs (Distinguished Names).

    To display syntax help for ldapmodrdn, type:

    ldapmodrdn -?
    

    Options

    -c
    Continuous operation mode. Errors are reported, but ldapmodrdn continues with modifications. Otherwise the default action is to exit after reporting an error.

    -C charset
    Specifies that the strings supplied as input to the ldapmodrdn utility are represented in a local character set, as specified by charset. Use -C charset to override the default, where strings must be supplied in UTF-8. See IANA Character Sets Supported by Platform for the specific charset values that are supported for each operating system platform. Note that the supported values for charset are the same values supported for the charset tag that is optionally defined in Version 1 LDIF files.

    -d debuglevel
    Set the LDAP debugging level to debuglevel. See Server Debug Mode for information about debug levels.

    -D binddn
    Use binddn to bind to the LDAP directory. binddn should be a string-represented DN.

    -f file
    Read the entry modification information from file instead of from standard input or the command-line (by specifying rdn and newrdn). Standard input can be supplied from a file, as well ("< file").

    -h ldaphost
    Specify an alternate host on which the ldap server is running.

    -K keyfile
    Specify the name of the SSL key database file (with default extension of "kdb"). If the key database file is not in the current directory, specify the fully-qualified key database filename. If a key database filename is not specified, this utility will first look for the presence of the SSL_KEYRING environment variable with an associated filename. If the SSL_KEYRING environment variable is not defined, the default keyring file will be used, if present.

    A default keyring file (that is, ldapkey.kdb) and the associated password stash file (that is, ldapkey.sth) are installed in the /lib directory under LDAPHOME, where LDAPHOME is the path to the installed LDAP support. LDAPHOME varies by operating system platform:

    See IBM Directory C-Client SDK Programming Reference for more information about default key database files, and default Certificate Authorities.

    If a keyring database file cannot be located, a "hard-coded" set of default trusted certificate authority roots is used. The key database file typically contains one or more certificates of certificate authorities (CAs) that are trusted by the client. These types of X.509 certificates are also known as trusted roots. For more information on managing an SSL key database, see Appendix B, Using gsk5ikm. Also see the SSL Notes and Secure Sockets Layer for more information about SSL and certificates.

    This parameter effectively enables the -Z switch.

    -m mechanism
    Use mechanism to specify the SASL mechanism to be used to bind to the server. The ldap_sasl_bind_s() API is used. The -m parameter is ignored if -V 2 is set. If -m is not specified, simple authentication is used.

    -M
    Manage referral objects as regular entries.

    -n
    Show what would be done, but don't actually modify entries. Useful for debugging in conjunction with -v.

    -N certificatename
    Specify the label associated with the client certificate in the key database file. Note that if the LDAP server is configured to perform server authentication only, a client certificate is not required. If the LDAP server is configured to perform client and server Authentication, a client certificate might be required. certificatename is not required if a default certificate/private key pair has been designated as the default. Similarly, certificatename is not required if there is a single certificate/private key pair in the designated key database file. This parameter is ignored if neither -Z nor -K is specified.

    -O hopcount
    Specify hopcount to set the maximum number of hops that the client library takes when chasing referrals. The default hopcount is 10.

    -p ldapport
    Specify an alternate TCP port where the ldap server is listening. The default LDAP port is 389. If not specified and -Z is specified, the default LDAP SSL port 636 is used.

    -P keyfilepw
    Specify the key database password. This password is required to access the encrypted information in the key database file (which may include one or more private keys). If a password stash file is associated with the key database file, the password is obtained from the password stash file, and the -P parameter is not required. This parameter is ignored if neither -Z nor -K is specified.

    -r
    Remove old RDN values from the entry. Default action is to keep old values.

    -R
    Specifies that referrals are not to be automatically followed.

    -v
    Use verbose mode, with many diagnostics written to standard output.

    -V
    Specifies the LDAP version to be used by ldapmodrdn when it binds to the LDAP server. By default, an LDAP V3 connection is established. To explicitly select LDAP V3, specify -V 3. Specify -V 2 to run as an LDAP V2 application. An application, like ldapmodrdn, selects LDAP V3 as the preferred protocol by using ldap_init instead of ldap_open.

    -w passwd | ?
    Use passwd as the password for authentication. Use the ? to generate a password prompt. Using this prompt prevents your password from being visible through the ps command.

    -Z
    Use a secure SSL connection to communicate with the LDAP server. The -Z option is only supported when the SSL component entry, as provided by IBM's GSKit, is installed.

    dn rdn

    Input format

    If the command-line arguments dn and rdn are given, rdn replaces the RDN of the entry specified by the DN, dn. Otherwise, the contents of file (or standard input if no - f flag is given) consist of one or more entries:

    Distinguished Name (DN)
     
    Relative Distinguished Name (RDN)
     
     
    

    One or more blank lines may be used to separate each DN and RDN pair.

    Examples

    Assuming that the file /tmp/entrymods exists and has the contents:

    cn=Modify Me, o=University of Life, c=US        
    cn=The New Me
    

    the command:

    ldapmodrdn -r -f /tmp/entrymods 
    

    changes the RDN of the Modify Me entry from Modify Me to The New Me and the old cn, Modify Me is removed.

    Notes

    If entry information is not supplied from file through the use of the -f option (or from the command-line pair dn and rdn), the ldapmodrdn command waits to read entries from standard input. To break out of the wait, use Ctrl+C or Ctrl+D.

    SSL Notes

    To use the SSL-related functions associated with this utility, the SSL libraries and tools must be installed. The SSL libraries and tools are provided with IBM's Global Security Kit (GSKit), which includes security software developed by RSA Security Inc.

    Note:
    For information regarding the use of 128-bit and triple DES encryption by LDAP applications, including the LDAP sample programs, see "LDAP_SSL" in the IBM Directory C-Client SDK Programming Reference. This section describes the steps required to build the sample programs and your applications so they can use SSL with the strongest encryption algorithms available.
    See the make file associated with the sample programs for more information on linking an LDAP application so that it has access to 128-bit and triple-DES encryption algorithms.

    The content of a client's key database file is managed with the gsk5ikm utility. For more information on this Java utility, see Appendix B, Using gsk5ikm. The gsk5ikm utility is used to define the set of trusted certification authorities (CAs) that are to be trusted by the client. By obtaining certificates from trusted CAs, storing them in the key database file, and marking them as 'trusted', you can establish a trust relationship with LDAP servers that use certificates issued by one of the trusted CAs. The gsk5ikm utility can also be used to obtain a client certificate, so that client and server authentication can be performed.

    If the LDAP servers accessed by the client use server authentication only, it is sufficient to define one or more trusted root certificates in the key database file. With server authentication, the client can be assured that the target LDAP server has been issued a certificate by one of the trusted CAs. In addition, all LDAP transactions that flow over the SSL connection with the server are encrypted, including the LDAP credentials that are supplied on the ldap_bind or ldap_simple_bind_s. For example, if the LDAP server is using a high-assurance VeriSign certificate, you should obtain a CA certificate from VeriSign, import it into your key database file, and mark it as trusted. If the LDAP server is using a self-signed server certificate, the administrator of the LDAP server can supply you with a copy of the server's certificate request file. Import the certificate request file into your key database file and mark it as trusted.

    If the LDAP servers accessed by the client use client and server authentication, it is necessary to:

    Diagnostics

    Exit status is 0 if no errors occur. Errors result in a non-zero exit status and a diagnostic message being written to standard error.

    See also

    ldapadd, ldapdelete, ldapmodify, ldapsearch

    LDAPSEARCH

    LDAP search tool and sample program

    Synopsis

    ldapsearch [-a deref] [-A] [-b searchbase] [-B] [-C charset] [-d debuglevel]
    [-D binddn][-f file] [-F sep] [-h ldaphost] [-K keyfile] [-l timelimit] [-L] 
    [-m mechanism] [-M] [-n] [-N certificatename][-O hopcount] [-p ldapport] 
    [-P keyfilepw] [-q pagesize]  [-R] [-s scope ] [-t] [-T seconds][-v] [-V] 
    [-w passwd | ?] [-z sizelimit] [-Z] filter [attrs...] [-o attributename]
    

    Description

    ldapsearch is a command-line interface to the ldap_search library call.

    ldapsearch opens a connection to an LDAP server, binds, and performs a search using the filter. The filter should conform to the string representation for LDAP filters (see ldap_search in the IBM Directory Server Version 4.1 C-Client SDK Programming Reference for more information on filters).

    If ldapsearch finds one or more entries, the attributes specified by attrs are retrieved and the entries and values are printed to standard output. If no attrs are listed, all attributes are returned.

    To display syntax help for ldapsearch, type ldapsearch -?.

    Options

    -a deref
    Specify how aliases dereferencing is done. deref should be one of never, always, search, or find to specify that aliases are never dereferenced, always dereferenced, dereferenced when searching, or dereferenced only when locating the base object for the search. The default is to never dereference aliases.

    -A
    Retrieve attributes only (no values). This is useful when you just want to see if an attribute is present in an entry and are not interested in the specific values.

    -b searchbase
    Use searchbase as the starting point for the search instead of the default. If -b is not specified, this utility will examine the LDAP_BASEDN environment variable for a searchbase definition. If neither is set, the default base is set to "".

    -B
    Do not suppress display of non-ASCII values. This is useful when dealing with values that appear in alternate characters sets such as ISO-8859.1. This option is implied by the -L option.

    -C charset
    Specifies that strings supplied as input to the ldapsearch utility are represented in a local character set (as specified by charset). String input includes the filter, the bind DN and the base DN. Similarly, when displaying data, ldapsearch converts data received from the LDAP server to the specified character set. Use "-C charset" to override the default, where strings must be supplied in UTF-8. Also, if the -C option and the -L option are both specified, input is assumed to be in the specified character set, but output from ldapsearch is always preserved in its UTF-8 representation, or a base-64 encoded representation of the data when non-printable characters are detected. This is the case because standard LDIF files only contain UTF-8 (or base-64 encoded UTF-8) representations of string data. See Supported IANA character sets for the specific charset values that are supported for each operating system platform. Note that the supported values for charset are the same values supported for the charset tag that is optionally defined in Version 1 LDIF files.

    -d debuglevel
    Set the LDAP debugging level to debuglevel. See Server Debug Mode for information about debug levels.

    -D binddn
    Use binddn to bind to the LDAP directory. binddn should be a string-represented DN (see LDAP Distinguished Names).

    -f file
    Read a series of lines from file, performing one LDAP search for each line. In this case, the filter given on the command line is treated as a pattern where the first occurrence of %s is replaced with a line from file. If file is a single "-" character, then the lines are read from standard input.

    -F sep
    Use sep as the field separator between attribute names and values. The default separator is `=', unless the -L flag has been specified, in which case this option is ignored.

    -h ldaphost
    Specify an alternate host on which the ldap server is running.

    -K keyfile
    Specify the name of the SSL key database file (with default extension of "kdb"). If the key database file is not in the current directory, specify the fully-qualified key database filename. If a key database filename is not specified, this utility will first look for the presence of the SSL_KEYRING environment variable with an associated filename. If the SSL_KEYRING environment variable is not defined, the default keyring file will be used, if present.

    A default keyring file (that is, ldapkey.kdb) and the associated password stash file (that is, ldapkey.sth) are installed in the /lib directory under LDAPHOME, where LDAPHOME is the path to the installed LDAP support. LDAPHOME varies by operating system platform:

    See the "Default Keyring and Password" section of the LDAP_SSL API in the IBM C-Client SDK Programming Reference for more information about default key database files, and default Certificate Authorities.

    If a keyring database file cannot be located, a "hard-coded" set of default trusted certificate authority roots is used. The key database file typically contains one or more certificates of certificate authorities (CAs) that are trusted by the client. These types of X.509 certificates are also known as trusted roots. For more information on managing an SSL key database, see Appendix B, Using gsk5ikm. Also see the SSL Notes below and LDAP SSL APIs for more information about SSL and certificates.

    This parameter effectively enables the -Z switch.

    -l timelimit
    Wait at most timelimit seconds for a search to complete.

    -L
    Display search results in ldif format. This option also turns on the -B option, and causes the -F option to be ignored.

    -m mechanism
    Use mechanism to specify the SASL mechanism to be used to bind to the server. The ldap_sasl_bind_s() API will be used. The -m parameter is ignored if -V 2 is set. If -m is not specified, simple authentication is used.

    -M
    Manage referral objects as regular entries.

    -n
    Show what would be done, but don't actually modify entries. Useful for debugging in conjunction with -v.

    -N certificatename
    Specify the label associated with the client certificate in the key database file.
    Note:
    If the LDAP server is configured to perform server authentication only, a client certificate is not required. If the LDAP server is configured to perform client and server Authentication, a client certificate might be required. certificatename is not required if a default certificate/private key pair has been designated as the default. Similarly, certificatename is not required if there is a single certificate/private key pair in the designated key database file. This parameter is ignored if neither -Z nor -K is specified.

    -o attributename
    To specify an attribute to use for sort criteria of search results, you can use the -o (order) parameter. You can use multiple -o parameters to further define the sort order. In the following example, the search results are sorted first by surname (sn), then by given name, with the given name (givenname)being sorted in reverse (descending) order as specified by the prefixed minus sign ( - ):
    -o sn -o -givenname
    

    Thus, the syntax of the sort parameter is as follows:

     	[-]<attribute name>[:<matching rule OID>]
    

    where

    The default ldapsearch operation is not to sort the returned results.

    -O hopcount
    Specify hopcount to set the maximum number of hops that the client library takes when chasing referrals. The default hopcount is 10.

    -p ldapport
    Specify an alternate TCP port where the ldap server is listening. The default LDAP port is 389. If not specified and -Z is specified, the default LDAP SSL port 636 is used.

    -P keyfilepw
    Specify the key database password. This password is required to access the encrypted information in the key database file (which may include one or more private keys). If a password stash file is associated with the key database file, the password is obtained from the password stash file, and the -P parameter is not required. This parameter is ignored if neither -Z nor -K is specified.

    -q pagesize
    To specify paging of search results, two new parameters can be used: -q (query page size), and -T (time between searches in seconds). In the following example, the search results return a page (25 entries) at a time, every 15 seconds, until all the results for that search are returned. The ldapsearch client handles all connection continuation for each paged results request for the life of the search operation.
     -q 25  -T 15
    

    If the -v (verbose) parameter is specified, ldapsearch lists how many entries have been returned so far, after each page of entries returned from the server, for example, 30 total entries have been returned.

    Multiple -q parameters are enabled such that you can specify different page sizes throughout the life of a single search operation. In the following example, the first page is 15 entries, the second page is 20 entries, and the third parameter ends the paged result/search operation:

    -q 15 -q 20 -q 0
    

    In the following example, the first page is 15 entries, and all the rest of the pages are 20 entries, continuing with the last specified -q value until the search operation completes:

    -q 15 -q 20
    

    The default ldapsearch operation is to return all entries in a single request. No paging is done for the default ldapsearch operation.

    -R
    Specifies that referrals are not to be automatically followed.

    -s scope
    Specify the scope of the search. scope should be one of base, one, or sub to specify a base object, one-level, or subtree search. The default is sub.

    -t
    Write retrieved values to a set of temporary files. This is useful for dealing with non-ASCII values such as jpegPhoto or audio.

    -T seconds
    Time between searches (in seconds). The -T option is only supported when the -q option is specified.

    -v
    Use verbose mode, with many diagnostics written to standard output.

    -V
    Specifies the LDAP version to be used by ldapmodify when it binds to the LDAP server. By default, an LDAP V3 connection is established. To explicitly select LDAP V3, specify "-V 3". Specify "-V 2" to run as an LDAP V2 application. An application, like ldapmodify, selects LDAP V3 as the preferred protocol by using ldap_init instead of ldap_open.

    -w passwd | ?
    Use passwd as the password for authentication. Use the ? to generate a password prompt. Using this prompt prevents your password from being visible through the ps command.

    -z sizelimit
    Limit the results of the search to at most sizelimit entries. This makes it possible to place an upper bound on the number of entries that are returned for a search operation.

    -Z
    Use a secure SSL connection to communicate with the LDAP server. The -Z option is only supported when the SSL component entry, as provided by IBM's GSKit, is installed.

    filter
    Specifies a string representation of the filter to apply in the search. Simple filters can be specified as attributetype=attributevalue. More complex filters are specified using a prefix notation according to the following Backus Naur Form (BNF):
    <filter> ::='('<filtercomp>')'
    <filtercomp> ::= <and>|<or>|<not>|<simple>
    <and> ::= '&' <filterlist>
    <or> ::= '|' <filterlist>
    <not> ::= '!' <filter>
    <filterlist> ::= <filter>|<filter><filtertype>
    <simple> ::= <attributetype><filtertype>
    <attributevalue>
    <filtertype> ::= '='|'~='|'<='|'>='
    

    The '~=' construct is used to specify approximate matching. The representation for <attributetype> and <attributevalue> are as described in "RFC 2252, LDAP V3 Attribute Syntax Definitions". In addition, <attributevalue> can be a single * to achieve an attribute existence test, or can contain text and asterisks ( * ) interspersed to achieve substring matching.

    For example, the filter "mail=*" finds any entries that have a mail attribute. The filter "mail=*@student.of.life.edu" finds any entries that have a mail attribute ending in the specified string. To put parentheses in a filter, escape them with a backslash (\) character.

    Note:
    A filter like "cn=Bob *", where there is a space between Bob and the asterisk ( * ), matches "Bob Carter" but not "Bobby Carter" in IBM Directory. The space between "Bob" and the wildcard character ( * ) affects the outcome of a search using filters.

    See "RFC 2254, A String Representation of LDAP Search Filters" for a more complete description of allowable filters.

    Output format

    If one or more entries are found, each entry is written to standard output in the form:

          Distinguished Name (DN)
     
          attributename=value
     
          attributename=value
     
          attributename=value
     
         ...
    

    Multiple entries are separated with a single blank line. If the -F option is used to specify a separator character, it will be used instead of the `=' character. If the -t option is used, the name of a temporary file is used in place of the actual value. If the -A option is given, only the "attributename" part is written.

    Examples

    The following command:

     ldapsearch "cn=john doe" cn telephoneNumber
    

    performs a subtree search (using the default search base) for entries with a commonName of "john doe". The commonName and telephoneNumber values is retrieved and printed to standard output. The output might look something like this if two entries are found:

      cn=John E Doe, ou="College of Literature, Science, and the Arts",
    ou=Students, ou=People, o=University of Higher Learning, c=US
     
      cn=John Doe
     
      cn=John Edward Doe
     
      cn=John E Doe 1
     
      cn=John E Doe
     
      telephoneNumber=+1 313 555-5432
     
      
     
      cn=John B Doe, ou=Information Technology Division,
    ou=Faculty and Staff, ou=People, o=University of Higher Learning, c=US
     
      cn=John Doe
     
      cn=John B Doe 1
     
      cn=John B Doe
     
      telephoneNumber=+1 313 555-1111
     
     
    

    The command:

    ldapsearch -t "uid=jed" jpegPhoto audio
    

    performs a subtree search using the default search base for entries with user id of "jed". The jpegPhoto and audio values are retrieved and written to temporary files. The output might look like this if one entry with one value for each of the requested attributes is found:

    cn=John E Doe, ou=Information Technology Division,
     
      ou=Faculty and Staff,
     
      ou=People, o=University of Higher Learning, c=US
     
      audio=/tmp/ldapsearch-audio-a19924
     
      jpegPhoto=/tmp/ldapsearch-jpegPhoto-a19924
     
     
    

    This command:

    ldapsearch -L -s one -b "c=US" "o=university*" o description 
    

    will perform a one-level search at the c=US level for all organizations whose organizationName begins with university. Search results will be displayed in the LDIF format (see LDAP Data Interchange Format). The organizationName and description attribute values will be retrieved and printed to standard output, resulting in output similar to this:

    dn: o=University of Alaska Fairbanks, c=US
     
      o: University of Alaska Fairbanks
     
      description: Preparing Alaska for a brave new tomorrow
     
      description: leaf node only
     
      
     
      dn: o=University of Colorado at Boulder, c=US
     
      o: University of Colorado at Boulder
     
      description: No personnel information
     
      description: Institution of education and research
     
      
     
      dn: o=University of Colorado at Denver, c=US
     
      o: University of Colorado at Denver
     
      o: UCD
     
      o: CU/Denver
     
      o: CU-Denver
     
      description: Institute for Higher Learning and Research
     
      
     
      dn: o=University of Florida, c=US
     
      o: University of Florida
     
      o: UFl
     
      description: Shaper of young minds
     
      
     
     ...
    

    SSL Notes

    To use the SSL-related functions associated with this utility, the SSL libraries and tools must be installed. The SSL libraries and tools are provided with IBM's Global Security Kit (GSKit), which includes security software developed by RSA Security Inc.

    Note:
    For information regarding the use of 128-bit and triple DES encryption by LDAP applications, including the LDAP sample programs, see SSL Usage Notes. This section describes the steps required to build the sample programs (and your applications) so they can use SSL with the strongest available encryption algorithms.
    See the make file associated with the sample programs for more information on linking an LDAP application so that it has access to 128-bit and triple-DES encryption algorithms.

    The contents of a client's key database file is managed with the gsk5ikm utility. For more information on this Java utility, see Appendix B, Using gsk5ikm. The gsk5ikm utility is used to define the set of trusted certification authorities (CAs) that are to be trusted by the client. By obtaining certificates from trusted CAs, storing them in the key database file, and marking them as trusted, you can establish a trust relationship with LDAP servers that use certificates issued by one of the CAs that are marked as trusted. The gsk5ikm utility can also be used to obtain a client certificate, so that client and server authentication can be performed.

    If the LDAP servers accessed by the client use server authentication only, it is sufficient to define one or more trusted root certificates in the key database file. With server authentication, the client can be assured that the target LDAP server has been issued a certificate by one of the trusted CAs. In addition, all LDAP transactions that flow over the SSL connection with the server are encrypted (including the LDAP credentials that are supplied on the ldap_bind or ldap_simple_bind_s (see the LDAP_Bind APIs).

    For example, if the LDAP server is using a high-assurance VeriSign certificate, you should obtain a CA certificate from VeriSign, import it into your key database file, and mark it as trusted. If the LDAP server is using a self-signed server certificate, the administrator of the LDAP server can supply you with a copy of the server's certificate request file. Import the certificate request file into your key database file and mark it as trusted.

    If the LDAP servers accessed by the client use client and server authentication, it is necessary to:

    Diagnostics

    Exit status is 0 if no errors occur. Errors result in a non-zero exit status and a diagnostic message being written to standard error.

    See also

    ldapadd, ldapdelete, ldapmodify, ldapmodrdn


    Server utilities

    This sections describes the server utilities.

    Notes:

    1. The server must be stopped before using the server utilities.

    2. Ensure that no applications are attached to the directory database. If there are applications attached, none of the server utilities will run.

    Ldif utility

    The LDAP Data Interchange Format (LDIF) tool ldif is a shell-accessible utility that converts arbitrary data values to LDIF. It reads input values from standard input and produces LDIF.

    Synopsis:
    ldif -b <attrname>

    Command Line Option:
    All options are case sensitive.

    -b
    Input is a single raw binary value

    <attrname>
    The name of the attribute for which values are to be converted. Without the -b option, ldif considers each line of standard input to be a separate value of the attribute.

    LDIF is used to represent LDAP entries in text form. The purpose of this information is to describe the LDAP Data Interchange Format (LDIF), as used by the ldapmodify, ldapadd, and ldapsearch command-line utilities.

    Format example

    The basic form of an LDIF entry is:

    dn: <distinguished name>: 
    <attrtype>: <attrvalue>
    <attrtype>: <attrvalue>
    ...
    

    A line can be continued by starting the next line with a single space or tab character, for example:

    dn: cn=Barbara J Jensen, o=University of Michi
           gan, c=US
    

    Multiple attribute values are specified on separate lines, for example:

     cn: Barbara J Jensen
     cn: Babs Jensen
    

    If an <attrvalue> contains a non-printing character, or begins with a space or a colon ":", the <attrtype> is followed by a double colon and the value is encoded in base 64 notation. The value that begins with a space would be encoded like this:

    cn:: IGJlZ2lucyB3aXRoIGEgc3BhY2U=
    

    Multiple entries within the same LDIF file are separated by blank lines.

    Adding the first replica object would look something like the following in LDIF format:

    dn: cn=myReplica, cn=localhost
    cn: myReplica 
    objectclass : replicaObject 
    replicaHost: mymachine.austin.ibm.com 
    replicaBindDn: cn=Admin, c=US
    replicaCredentials: password
    replicaPort: 1010 
     
    

    The replicaBindDn (cn=Admin, c=US) must be the same as the master server DN on the replica (mymachine.austin.ibm.com). Similarly, replicaCredentials must be the same as the masterServerPassword on the replica, and the replicaPort must be the same as the port on the replica.

    LDIF ACL example

    dn: cn=John Doe, ou=Austin, o=IBM, c=US
    objectclass: top
    objectclass: person
    objectclass: organizationalPerson
    cn: John Doe
    sn: Doe
    dept: abcd
    aclEntry: access-id:cn=Bert Hello, ou=Austin, o=IBM, c=US:object:da:normal
            :rwsc:sensitive:rsc
    aclEntry: group:cn=Anybody::normal:rsc
    aclEntry: access-id:cn=Amy Too, ou=Austin, o=IBM, c=US:object:da:normal
            :rwsc:sensitive:rsc:critical:rsc
    aclPropagate:TRUE
    entryOwner: group:cn=personnel, ou=Austin, o=IBM, c=US
    ownerPropagate: TRUE
    

    Ldif2db utility

    This program is used to load entries specified in text LDAP Directory Interchange Format (LDIF) into a directory stored in a relational database. The database must already exist. ldif2db can be used to add entries to an empty directory database or to a database that already contains entries.

    Notes:

    1. The server must be stopped before using the server utilities.

    2. Ensure that no applications are attached to the directory database. If there are applications attached, none of the server utilities will run.

    Synopsis:
    ldif2db -i <inputfile> [-f <configurationfile>]

    Command Line Options:
    All options are case insensitive.

    -i <inputfile>
    Specify the name of the LDIF input file, containing directory entries in LDIF format. This option is required. If the file is not in the current directory, a full path and file name must be specified.

    -f <configurationfile>
    Use this option to specify the slapd configuration file.

    All other command line inputs result in a syntax error message, after which the correct syntax is displayed.

    Note:
    When records are added using ldif2db, the master server should be stopped and then restarted immediately. If replicas are added before the server is recycled, incorrect replication will result.

    Bulkload utility

    The bulkload utility is used to load the directory data from an ldif file. It is a faster alternative to ldif2db and is available for bulk-loading large amounts of data in LDIF format.

    Notes:

    1. The server must be stopped before using the server utilities.

    2. Ensure that no applications are attached to the directory database. If there are applications attached, none of the server utilities will run.

    3. All bulkload environment variables are deprecated in IBM Directory Server Version 4.1. The ACLCHECK, ACTION, LDAPIMPORT, SCHEMACHECK, and STRING_DELIMITER environment variables are replaced with the command line options -A, -a, -L, -S, -s respectively. The command line switches are now case sensitive.

    4. To run the bulkload utility you must have dbadm or sysadm privilege. If you use a Windows system, you must also run the bulkload utility within the DB2 command line interpreter (CLI). To start the DB2 CLI, click Start->Run and type db2cmd.

    5. If archival logging is enabled in DB2, the bulkload utility will fail. Make sure archival logging is disabled before using the bulkload utility.
      update database configuration for ldapdb2 using LOGRETAIN OFF USEREXIT OFF
      

    Synopsis:
    bulkload -i <ldiffile>[-a <parse_and_load|parseonly|loadonly>] [-A <yes|no|fast>] [-c <yes|no>] [-d <number>] [-E <number>] [-f <configurationfile>] [-I <yes|no>] [-L <path>] [-N] [-?][-s <character>] [-S <yes|no|only>] [-v]

    Command Line Options:

    -i <ldiffile>
    Specifies the name of the input file containing the LDIF data to be loaded into the directory. It might include a path. The file /usr/ldap/examples/sample.ldif contains some sample data in the correct format.

    -a <parse_and_load|parseonly|loadonly>
    Specifies the load action mode.

    -A <yes|no|fast>
    Specifies whether to process the ACL information contained in the ldif file. The default is fast. The no parameter loads the default acls.

    -c <yes|no>
    Allows you to skip index recreation. For example, if you are running successive bulkloads and you want to skip recreation between loads, you can postpone index creation until the last bulkload. Issue the final bulkload with -c yes.

    -d <number>
    Use the -d to set the level of the debug mask and to turn debug on. Use this option to find out the data records that might have a problem and cause parsing errors. See Server Debug Mode for information about debug levels.
    Note:
    Ensure that the ldtrc utility is on before using the -d option, otherwise no messages are displayed. Issue the command ldtrc on.

    -E <number>
    Specifies the number limit for parsing errors reported. When the limit is reached the bulkload command exits. The default is infinity.

    -f <configurationfile>
    Use this option to specify the slapd configuration file.

    -I <yes|no>
    Specifies whether to drop the indexes before the load. The default is no.

    -L <path>
    Specifies the directory used for storing temporary data. The default path for this temporary storage is:
    • AIX operating systems /tmp/ldapimport
    • Windows operating systems c:\tmp\ldapimport
    • Linux, Solaris, and HP operating systems /var/ldap/ldapimport

    -N
    Specifies that the load is nonrecoverable.

    -?
    Requests the bulkload syntax help message.

    -s <character>
    Specifies the string delimiting character used for importing
    Note:
    Bulkload might fail to load ldif files that contain certain UTF-8 characters. This is because of a problem with the DB2 LOAD tool when parsing the default bulkload string delimiter, vertical bar ( | ) in multi-byte character sets. Reassign the string delimiter to $.
    bulkload -i <ldiffile> -s $
    

    -S <yes|no|only>
    Verifies that individual directory entries are valid based on the object class definitions and attribute type definitions found in the configuration files.

    Schema checking verifies that all object classes and attributes have been defined, that all attributes specified for each entry comply with the list of "required" and "allowed" attributes in the object class definition, and that binary attribute values are in the correct 64-bit encoded form.

    yes
    Schema checking is done on the data, before adding it to the directory.

    no
    No schema checking is done on the data before adding it to the directory. This provides much faster performance. This option assumes that the data in the input file is valid. This is the default option.

    only
    Schema checking is done on the data, but it is not added to the directory. This option provides the most feedback and error reporting.

    The recommended approach is to use the -S only option first to validate the data, and thereafter to use the default -S no whenever loading the data into the directory.

    -v
    Specifies verbose mode. This option gives you the greatest amount of detail.

    For better performance the bulkload tool assumes that the data in the input file is correct or that the data has been checked in an earlier loading. The bulkload tool can, however, perform some basic checks on the input data.

    The bulkload utility cannot run while the directory server (slapd) is running.

    In addition to the disk space required for data storage in the local database directory, the bulkload tool requires temporary storage for data manipulation before inserting the data into the database. The default path for this temporary storage is platform specific. See the -L option description for the path names. You can change the path using the -L option:

    bulkload -i <ldiffile> -L /newpath
    

    You must have write permission to this directory. You need temporary storage at least 2.5 times the size of the ldif file that is available in the ldapimport directory. You still might need additional temporary storage depending on your data.

    If you receive an error like the following:

    SQL3508N Error in accessing a file of type "SORTDIRECTORY" during load
    or load query.  Reason code: "2".  Path: "/u/ldapdb2/sqllib/tmp/".
    

    you need to set the environment variable DB2SORTTMP to a directory (or directories) in a file system with more space to be utilized during the bulkload. Multiple directories can be specified separated by a comma ( , ) as in:

    export DB2SORTTMP=/sortdir1,/sortdir2
    

    When running bulkload, inspect the output messages carefully. If errors occur during execution, the directory might be incompletely populated. You might need to drop all the LDAP tables, or drop the database (re-create an empty database), and start over. If this happens, no data was added to the directory, and the bulkload must be attempted again. In addition, you might lose data when you drop all the LDAP tables.

    The file /usr/ldap/examples/sample.ldif includes sample data. You can use the data in the file to experiment with populating a directory using the bulkload tool, or you can use the ldif2db command line utility. However, the ldif2db utility might be considerably slower than the bulkload utility for large amounts of data.

    For performance reasons, the bulkload tool does not check for duplicate entries. Ensure that your input ldif file does not contain duplicate entries. If any duplicates exist, remove the duplicate entries.

    If bulkload fails at the DB2 LOAD phase, see the db2load.log file for the reasons. This log file is located on the Windows operating systems in c:\tmp\ldapimport, on AIX operating systems in /tmp/ldapimport, and on Linux , Solaris, and HP operating systems in /var/ldap/ldapimport. If the -L option was specified, find the file in the directory defined by the -L option. Correct the problem and rerun bulkload. Bulkload reloads the files from the last successful load consistency point.

    When bulkload fails, the recovery information is stored in <installation directory>/etc/bulkload_status. This file is not removed until all of the data is loaded successfully. This insures the data integrity of the directory. If you decide to reconfigure the database and start over, the bulkload_status file needs to be removed manually or bulkload still tries to recover from the last successful load point.

    Db2ldif utility

    This program is used to dump entries from a directory stored in a relational database into a text file in LDAP Directory Interchange Format (LDIF).

    Note:
    This utility can be run at anytime, the server does not need to be stopped.

    Synopsis:
    db2ldif -o <outputfile> [-s <subtree DN>]

    Command Line Options:
    All options are case sensitive.

    -o <outputfile>
    Specifies the LDIF output file to contain the directory entries in LDIF. All entries from the specified subtree are written in LDIF to the output file. This option is required. If the file is not in the current directory, a full path and file name must be specified.

    -s <subtree DN>
    The subtree DN identifies the top entry of the subtree that is to be dumped to the LDIF output file. This entry, plus all below it in the directory hierarchy, are written out. If this option is not specified, all directory entries stored in the database are written to the output file based on the suffixes specified in the configuration file.

    All other command line inputs result in a syntax error message, after which the proper syntax is displayed.


    Directory schema

    The IBM Directory (Version 4.1) includes dynamic schema support. The schema is published as part of the directory information, and is available in the Subschema entry (DN="cn=schema"). You can query the schema using the ldap_search() API and modify it using ldap_modify(). See the IBM Directory Client SDK Programming Reference for more information about these APIs.

    The schema has more configuration information than that included in the LDAP Version 3 Request For Comments (RFCs) or standard specifications. For example, for a given attribute, you can state which indexes must be maintained. This additional configuration information is maintained in the subschema entry as appropriate. An additional object class is defined for the subschema entry IBMsubschema , which has "MAY" attributes that hold the extended schema information.


    Common schema support

    The IBM Directory supports standard directory schema as defined in the following:

    This version of LDAP includes the LDAP Version 3 defined schema in the default schema configuration. It also includes the DEN schema definitions.

    IBM also provides a set of extended common schema definitions that other IBM products share when they exploit the LDAP directory. They include:


    The subschema entries

    There is one subschema entry per server. All entries in the directory have an implied subschemaSubentry attribute type. The value of the subschemaSubentry attribute type is the DN of the subschema entry that corresponds to the entry. All entries under the same server share the same subschema entry, and their subschemaSubentry attribute type has the same value. The subschema entry has the hardcoded DN 'cn=schema'.

    The subschema entry belongs to the object classes 'top', 'subschema', and 'IBMsubschema'. The 'IBMsubschema' object class has no MUST attributes and one MAY attribute type ('IBMattributeTypes').


    The IBMsubschema object class

    The IBMsubschema object class is used only in the subschema entry as follows:

    ( <objectClass-oid-TBD> NAME 'IBMsubschema' AUXILIARY
         MAY IBMattributeTypes )
    

    The IBMAttributeTypes attribute type

    The IBMAttributeTypes object class can be used to define schema information not covered by the LDAP Version 3 standard for attributes. Values of IBMAttributeTypes must comply with the following grammar:

    IBMAttributeTypesDescription = "(" whsp
            numericoid whsp
          [ "DBNAME"   qdescrs ]            ; at most 2 names (table, column)
          [ "ACCESS-CLASS" whsp IBMAccessClass whsp ]
          [ "LENGTH" wlen whsp ]            ; maximum length of attribute
          [ "EQUALITY" [ IBMwlen ] whsp ]   ; create index for matching rule
          [ "ORDERING" [ IBMwlen ] whsp ]   ; create index for matching rule
          [ "APPROX"   [ IBMwlen ] whsp ]   ; create index for matching rule
          [ "SUBSTR"   [ IBMwlen ] whsp ]   ; create index for matching rule
          [ "REVERSE"  [ IBMwlen ] whsp ]   ; reverse index for substring
          whsp ")"
     
       IBMAccessClass =
          "NORMAL"            / ; this is the default
          "SENSITIVE"         /
          "CRITICAL"          /
          "RESTRICTED"        /
          "SYSTEM"            /
          "OBJECT"
     
       IBMwlen = whsp len
     
    

    Numericoid
    Used to correlate the value in attributetypes with the value in IBMAttributeTypes.

    DBNAME
    You can provide 2 names at the most, if indeed 2 names are given. The first is the table name used for this attribute. The second is the column name used for the fully normalized value of the attribute in the table. If you provide only one name, it is used as the table name as well as the column name. If you do not provide any DBNAMEs, then the short attribute name is used (from the attributetypes).

    ACCESS-CLASS
    The access classification for this attribute type. If ACCESS-CLASS is omitted, it defaults to normal.

    LENGTH
    The maximum length of this attribute. The length is expressed as the number of bytes. IBM Directory Version 4.1 has a provision for specifying the length of an attribute. In the attributetypes value, the string:
    ( attr-oid ... SYNTAX syntax-oid{len} ... )
    

    can be used to indicate that the attributetype with oid attr-oid has a maximum length.

    EQUALITY, ORDERING, APPROX, SUBSTR, REVERSE
    If any of these attributes are used, an index is created for the corresponding matching rule. The optional length specifies the width of the indexed column. For many syntaxes, you can share a single index to implement multiple matching rules.The IBM Directory server takes advantage of this. It assigns a length when one is not provided by the user. SLAPD can also use a shorter length than what the user requested when it makes sense to do so. For example, when the length of the index exceeds the maximum length of the attribute, the index length is ignored.

    Schema file attribute types

    Schema configuration provides values for the following attribute types:

    The syntax of these schema definitions is based on the LDAP Version 3 RFCs.

    A sample configuration file could contain:

     objectclasses=( 1.3.6.1.4.1.1466.101.120.111
                     NAME 'extensibleObject'
                     SUP top AUXILIARY )
     
      objectclasses=(  2.5.20.1
                      NAME 'subschema'
                      AUXILIARY MAY
                          ( dITStructureRules
                         $ nameForms
                         $ ditContentRules
                         $ objectClasses
                         $ attributeTypes
                         $ matchingRules
                         $ matchingRuleUse  ) )
      objectclasses=( 2.5.6.1
                      NAME 'alias'
                      SUP top STRUCTURAL
                      MUST aliasedObjectName )
     
      attributeTypes {
          ( 2.5.18.10 NAME 'subschemaSubentry' EQUALITY distinguishedNameMatch
            SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 NO-USER-MODIFICATION
            SINGLE-VALUE USAGE directoryOperation )
          ( 2.5.21.5 NAME 'attributeTypes'
              EQUALITY objectIdentifierFirstComponentMatch
              SYNTAX 1.3.6.1.4.1.1466.115.121.1.3 USAGE directoryOperation )
          ( 2.5.21.6 NAME 'objectClasses'
              EQUALITY objectIdentifierFirstComponentMatch
              SYNTAX 1.3.6.1.4.1.1466.115.121.1.37 USAGE directoryOperation )
              SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 USAGE directoryOperation )
    }
     
     
        ldapSyntaxes {
                  ( 1.3.6.1.4.1.1466.115.121.1.5 DESC 'Binary' )
                  ( 1.3.6.1.4.1.1466.115.121.1.7 DESC 'Boolean' )
                  ( 1.3.6.1.4.1.1466.115.121.1.12 DESC 'DN' )
                  ( 1.3.6.1.4.1.1466.115.121.1.15 DESC 'Directory String' )
                  ( 1.3.6.1.4.1.1466.115.121.1.24 DESC 'Generalized Time' )
                  ( 1.3.6.1.4.1.1466.115.121.1.26 DESC 'IA5 String' )
                  ( 1.3.6.1.4.1.1466.115.121.1.27 DESC 'INTEGER' )
                  ( 1.3.6.1.4.1.1466.115.121.1.50 DESC 'Telephone Number' )
                  ( 1.3.6.1.4.1.1466.115.121.1.53 DESC 'UTC Time' )
        }
     
        matchingRules {
            ( 2.5.13.2 NAME 'caseIgnoreMatch'
              SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
            ( 2.5.13.0 NAME 'objectIdentifierMatch'
              SYNTAX 1.3.6.1.4.1.1466.115.121.1.38 )
            ( 2.5.13.30 NAME 'objectIdentifierFirstComponentMatch'
              SYNTAX 1.3.6.1.4.1.1466.115.121.1.38 )
            ( 2.5.13.4 NAME 'caseIgnoreSubstringsMatch'
              SYNTAX 1.3.6.1.4.1.1466.115.121.1.58 )
        }
    

    As shown in the preceding example, it is not required that all of the attribute values of a given attribute type be provided in a single production.


    Schema queries

    The ldap_search() API can be used to query the subschema entry, as shown in the following example:

    DN           : "cn=schema"    
    search scope : base    
    filter       : objectclass=subschema or objectclass=*
    

    This example retrieves the full schema. To retrieve all of the values of selected attribute types, use the attrs parameter in ldap_search. You cannot retrieve only a specific value of a specific attribute type.

    See the IBM Directory Version 4.1: Client SDK Programming Reference for more information about the ldap_search API.


    Dynamic schema changes

    To perform a dynamic schema change, use the ldap_modify API with a DN of "cn=schema". It is permissible to add, delete, or replace only one schema entity (for example, an attribute type or an object class) at a time.

    To delete a schema entity, provide the oid in parentheses:

     ( oid )
    

    You can also provide a full description. In either case, the matching rule used to find the schema entity to delete is objectIdentifierFirstComponentMatch.

    To add or replace a schema entity, you MUST provide a LDAP Version 3 definition and you MAY provide the IBM definition. In all cases, you must provide only the definition or definitions of the schema entity that you want to affect.

    For example, to delete the attribute type 'cn' (its OID is 2.5.4.3), use ldap_modify() with:

       LDAPMod  attr;
       LDAPMod *attrs[] = { &attr, NULL };
       char    *vals [] = { "( 2.5.4.3 )", NULL };
       attr.mod_op      = LDAP_MOD_DELETE;
       attr.mod_type    = "attributeTypes";
       attr.mod_values  = vals;
       ldap_modify_s(ldap_session_handle, "cn=schema", attrs);
    

    To add a new attribute type bar with OID 20.20.20 that has a NAME of length 20 chars:

    char    *vals1[] = { "( 20.20.20 NAME 'bar' SUP NAME )", NULL };
       char    *vals2[] = { "( 20.20.20 LENGTH 20 )", NULL };
       LDAPMod  attr1;
       LDAPMod  attr2;
       LDAPMod *attrs[] = { &attr1, &attr2, NULL };
       attr1.mod_op = LDAP_MOD_ADD;
       attr1.mod_type = "attributeTypes";
       attr1.mod_values = vals1;
       attr2.mod_op = LDAP_MOD_ADD;
       attr2.mod_type = "IBMattributeTypes";
       attr2.mod_values = vals2;
       ldap_modify_s(ldap_session_handle, "cn=schema", attrs);
    

    See the IBM Directory Version 4.1: Client SDK Programming Reference for more information about the ldap_modify API.


    Disallowed schema changes

    Not all schema changes are allowed. Change restrictions include the following:

    Changes to the schema that affect the operation of the server are not allowed. The following schema definitions are required by the directory server. They must not be changed.

    Object classes:

    Attributes:

    Syntaxes:
    All

    Matching Rules:
    All

    Schema checking

    When the server is initialized, the schema files are read and checked for consistency and correctness. If the checks fail, the server fails to initialize with a proper error message. During any dynamic schema change, the resulting schema is also checked for consistency and correctness. If the checks fail, an error is returned and the change fails. Some checks are part of the grammar (for example, an attribute type can have at most one supertype, or an object class can have any number of superclasses).

    The following items are checked for attribute types:

    The following items are checked for object classes:


    Checking an entry against the schema

    When an entry is added or modified through an LDAP operation, the entry is checked against the schema. By default, all checks listed in this section are performed. However, you can selectively disable some of them by providing an ibm-slapdSchemaCheck value to the slapd32.conf configuration directive. See the IBM Directory Server Version 4.1 Installation and Configuration Guide for Multiplatforms for information about schema configuration attributes.

    To comply with the schema an entry is checked for the following conditions:

    With respect to object classes:

    The validity of the attribute types for an entry is determined as follows:

    The validity of the attribute type values for an entry is determined as follows:

    The validity of the DN is checked as follows:

    Access controls

    Dynamic schema changes can be performed only by a master server or a peer server (for replication) and administrator DN.


    Replication

    When a dynamic schema change is performed, it is replicated just like any other ldap_modify operation.


    iPlanet compatibility

    The parser used by the IBM Directory server allows the attribute values of schema attribute types (objectClasses and attributeTypes ) to be specified using the grammar of iPlanet. For example, descrs and numeric-oids can be specified with surrounding single quotation marks(as if they were qdescrs). However, the schema information is always made available through ldap_search. As soon as a single dynamic change (using ldap_modify) is performed on an attribute value in a file, the whole file is replaced by one where all attribute values follow the IBM Directory Version 4.1 specifications. Because the parser used on the files and on ldap_modify requests is the same, an ldap_modify that uses the iPlanet grammar for attribute values is also handled correctly.

    When a query is made on the subschema entry of a iPlanet server, the resulting entry can have more than one value for a given OID. For example, if a certain attribute type has two names (such as 'cn' and 'commonName'), then the description of that attribute type is provided twice, once for each name. The IBM Directory server can parse a schema where the description of a single attribute type or object class appears multiple times with the same description (except for NAME and DESCR). However, when the IBM Directory server publishes the schema it provides a single description of such an attribute type with all of the names listed (the short name comes first). For example, here is how iPlanet describes the common name attribute:

       ( 2.5.4.3 NAME 'cn'
         DESC 'Standard Attribute'
          SYNTAX '1.3.6.1.4.1.1466.115.121.1.15' )
     
       ( 2.5.4.3 NAME 'commonName'
         DESC 'Standard Attribute, alias for cn'
         SYNTAX '1.3.6.1.4.1.1466.115.121.1.15' )
    

    This is how the IBM Directory server describes it:

      ( 2.5.4.3 NAME ( 'cn' 'commonName' ) SUP name )
    

    The IBM Directory server supports subtypes. If you do not want 'cn' to be a subtype of name (which deviates from the standard), you can declare the following:

    ( 2.5.4.3 NAME ( 'cn' 'commonName' )
         DESC 'Standard Attribute'
         SYNTAX '1.3.6.1.4.1.1466.115.121.1.15' )
    

    The first name ('cn') is taken as the preferred or short name and all other names after 'cn' as alternate names. From this point on, the strings '2.3.4.3', 'cn' and 'commonName' (as well as their case-insensitive equivalents) can be used interchangeably within the schema or for entries added to the directory.


    Dynamic schema

    IBM Directory requires that the schema defined for a naming context be stored in a special directory entry, "cn=schema". The entry contains all of the schema defined for a suffix. To retrieve schema information, you can perform an ldap_search by using the following:

     DN: "cn=schema", search scope: base, filter: objectclass=subschema
     or objectclass=*
    

    The schema contains the following information:

    Object class
    A collection of attributes. A class can inherit attributes from one or more parent classes.

    Attribute types
    Contain information about the attribute, such as the name, oid, and matching rules.

    IBM attribute types
    The IBM LDAP directory implementation specific attributes, such as database table name, column name, SQL type, and the maximum length of each attribute.

    Syntaxes
    Include the following:
    1.3.18.0.2.8.1 DESC 'IBM Attribute Type Description' ) 
         1.3.6.1.4.1.1466.115.121.1.12 DESC 'DN - distinguished name' ) 
         1.3.6.1.4.1.1466.115.121.1.15 DESC 'Directory String - 
                                             case-insensitive string' ) 
         1.3.6.1.4.1.1466.115.121.1.16 DESC 'DIT Content Rule Description' ) 
         1.3.6.1.4.1.1466.115.121.1.17 DESC 'DIT Structure Rule Description' ) 
         1.3.6.1.4.1.1466.115.121.1.24 DESC 'Generalized Time' ) 
         1.3.6.1.4.1.1466.115.121.1.26 DESC 'IA5 String - case-sensitive 
                                             string' ) 
         1.3.6.1.4.1.1466.115.121.1.27 DESC 'INTEGER - integral number' ) 
         1.3.6.1.4.1.1466.115.121.1.3 DESC 'Attribute Type Description' ) 
         1.3.6.1.4.1.1466.115.121.1.30 DESC 'Matching Rule Description' ) 
         1.3.6.1.4.1.1466.115.121.1.31 DESC 'Matching Rule Use Description' ) 
         1.3.6.1.4.1.1466.115.121.1.35 DESC 'Name Form Description' ) 
         1.3.6.1.4.1.1466.115.121.1.37 DESC 'Object Class Description' ) 
         1.3.6.1.4.1.1466.115.121.1.38 DESC 'OID' ) 
         1.3.6.1.4.1.1466.115.121.1.5 DESC 'Binary  - octet string' ) 
         1.3.6.1.4.1.1466.115.121.1.50 DESC 'Telephone Number' ) 
         1.3.6.1.4.1.1466.115.121.1.53 DESC 'UTC Time' ) 
         1.3.6.1.4.1.1466.115.121.1.54 DESC 'LDAP Syntax Description' ) 
         1.3.6.1.4.1.1466.115.121.1.7 DESC 'Boolean - TRUE/FALSE' ) 
    

    Matching rules
    Include the following:
    MatchingRules= ( 2.5.13.5 NAME 'caseExactMatch' \
      SYNTAX 1.3.6.1.4.1.1466.115.121.1.1.26 ) 
    MatchingRules= ( 2.5.13.2 NAME 'caseIgnoreMatch' \
      SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 ) 
    MatchingRules= ( 2.5.13.7 NAME 'caseExactSubstringsMatch' \
      SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 ) 
    MatchingRules= ( 2.5.13.6 NAME 'caseExactOrderingMatch' \
      SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 ) 
    MatchingRules= ( 2.5.13.4 NAME 'caseIgnoreSubstringsMatch' \
      SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
    MatchingRules= ( 2.5.13.3 NAME 'caseIgnoreOrderingMatch' \
      SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
    MatchingRules= ( 1.3.18.0.2.4.405 NAME 'distinguishedNameOrderingMatch' \
      SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 ) 
    MatchingRules= ( 2.5.13.1 NAME 'distinguishedNameMatch' \
      SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 ) 
    MatchingRules= ( 2.5.13.28 NAME 'generalizedTimeOrderingMatch' \
      SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 ) 
    MatchingRules= ( 2.5.13.27 NAME 'generalizedTimeMatch' \
      SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 ) 
    MatchingRules= ( 1.3.6.1.4.1.1466.109.114.2 NAME 'caseIgnoreIA5Match' \
      SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) 
    MatchingRules= ( 1.3.6.1.4.1.1466.109.114.1 NAME 'caseExactIA5Match' \
      SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 ) 
    MatchingRules= ( 2.5.13.29 NAME 'integerFirstComponentMatch' \
      SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 ) 
    MatchingRules= ( 2.5.13.14 NAME 'integerMatch' \
      SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 ) 
    MatchingRules= ( 2.5.13.17 NAME 'octetStringMatch' \
      SYNTAX 1.3.6.1.4.1.1466.115.121.1.5 ) 
    MatchingRules= ( 2.5.13.0 NAME 'objectIdentifierMatch' \
      SYNTAX 1.3.6.1.4.1.1466.115.121.1.38 ) 
    MatchingRules= ( 2.5.13.30 NAME 'objectIdentifierFirstComponentMatch' \
      SYNTAX 1.3.6.1.4.1.1466.115.121.1.38 ) 
    MatchingRules= ( 2.5.13.21 NAME 'telephoneNumberSubstringsMatch' \
      SYNTAX 1.3.6.1.4.1.1466.115.121.1.50 ) 
    MatchingRules= ( 2.5.13.20 NAME 'telephoneNumberMatch' \
      SYNTAX 1.3.6.1.4.1.1466.115.121.1.50 ) 
    MatchingRules= ( 2.5.13.25 NAME 'uTCTimeMatch' \
      SYNTAX 1.3.6.1.4.1.1466.115.121.1.53 ) 
     
    

    The schema information can be modified through the ldap_modify API. Consult the Client SDK Programming Reference for additional information. With the DN "cn=schema" you can add, delete or replace an attribute type or an object class. To delete a schema entity, provide the oid in parenthesis (oid). You also can provide a full description. Add or replace a schema entry with the LDAP Version 3 definition or with the IBM attribute extension definition or with both definitions.


    Subclassing

    This version of the IBM Directory Server supports object inheritance for object class and attribute definitions. A new object class can be defined with parent classes (multiple inheritance) and the additional or changed attributes.

    Schema update operations are checked against the schema class hierarchy for consistency before being processed and committed.


    DEN schema support

    The Directory-Enabled Network (DEN) specification defines a standard schema form that stores and describes the relationships among objects that represent users, applications, network elements, and networking services.

    To support DEN, the IBM Directory server provides the following features:

    Generalized and UTC time

    There are different notations used to designate date and time-related information. For example, the fourth day of February in the year 1999 can be written as:

    2/4/99
    4/2/99
    99/2/4
    4.2.1999
    04-FEB-1999
    

    as well as many other notations.

    IBM Directory Server standardizes the timestamp representation by requiring the LDAP servers to support two syntaxes:

    The supported matching rules are generalizedTimeMatch for equality and generalizedTimeOrderingMatch for inequality. Substring search is not allowed. For example, the following filters are valid:

     generalized-timestamp-attribute=199910061030
     utc-timestamp-attribute>=991006
     generalized-timestamp-attribute=*
    

    The following filters are not valid:

    generalized-timestamp-attribute=1999*
    utc-timestamp-attribute>=*1010
    

    Secure Sockets Layer

    The IBM Directory server has the ability to protect LDAP access by encrypting data with Secure Sockets Layer (SSL) security. When using SSL to secure LDAP communications with the IBM Directory, both server authentication and client authentication are supported.

    With server authentication, the IBM Directory server must have a digital certificate (based on the X.509 standard). This digital certificate is used to authenticate the IBM Directory server to the client application (such as the Directory Management Tool or ldapsearch) or an application built from the application development package, for LDAP access over SSL.

    For server authentication The IBM Directory server supplies the client with the IBM Directory server's X.509 certificate during the initial SSL handshake. If the client validates the server's certificate, then a secure, encrypted communication channel is established between the IBM Directory server and the client application.

    For server authentication to work, the IBM Directory server must have a private key and associated server certificate in the server's key database file.

    Client authentication provides for two-way authentication between the LDAP client and the LDAP server.

    With client authentication, the LDAP client must have a digital certificate (based on the X.509 standard). This digital certificate is used to authenticate the LDAP client to the IBM Directory Server. See Client Authentication.

    To conduct commercial business on the Internet, you might use a widely known Certification Authority (CA), such as VeriSign, to get a 'high assurance' server certificate.


    Securing your Server with SSL

    The following high-level steps are required to enable SSL support for IBM Directory for server authentication. These steps assume you have already installed and configured the IBM Directory server:

    1. Install the IBM Directory GSKit package if it is not installed.
    2. Generate the IBM Directory server private key and server certificate using the gsk5ikm utility (installed with GSKit). The server's certificate may be signed by a commercial Certification Authority (CA), such as VeriSign, or it may be self-signed with the gsk5ikm tool. The CA's public certificate (or the self-signed certificate) must also be distributed to the client application's key database file.
    3. Store the server's key database file and associated password stash file on the server. The default path for the key database,...\ldap\etc directory, is a typical location.
    4. Access the web-based LDAP administrative interface to configure the LDAP server
      1. Configure IBM Directory to listen for LDAP requests on the SSL port.
      2. Select 'server authentication'.
      3. Specify the secure port (or use the default).
      4. Specify the path to the server's key database file. If a password stash file was created when gsk5ikm was used to create the server's key database file, do not specify a key database password on the LDAP Administrative interface.
      5. Specify the desired ciphers.
      6. Stop the LDAP server if it is running.
      7. Restart the LDAP server.

    If you also want to have secure communications between a master IBM Directory server and one or more replica servers, you must complete the following additional steps:

    1. Configure the replica directory server.
      Note:
      Follow the steps shown above for the master, except perform them for each replica. When configuring a replica for SSL, the replica is like the master with respect to its role when using SSL. The master is an LDAP client (using SSL) when communicating with a replica.
    2. Configure the master directory server
      1. Add the replica's signed server certificate to the master directory server's key database file, as a trusted root. In this situation, the master directory is actually an LDAP client. If using self-signed certificates, you must extract all the self-signed certificates from each replica IBM Directory server, and add them to the master's key database, and ensure they are marked as trusted-roots. Essentially, you are configuring the master as an SSL client of the replica server.
      2. Configure the master IBM Directory server to be aware of the replica server. Be sure to set the replicaPort attribute to use the port which the replica IBM Directory server uses for SSL communication.
    3. Restart both the master server and each replica server.
    Note:
    Only one key database is permitted per ldap server.

    Using the command line - required for the Linux and HP-UX operating systems:

    For server authentication, you can manually edit the slapd32.conf file under the cn=SSL, cn=Configuration entry. You can either omit sslAuth attribute or set it as follows:

    ibm-slapdSSLAuth: serverauth
    

    Configuring SSL for LDAP

    Note:
    SSL support is available only if you have IBM's GSKit installed on your system.

    To configure SSL for the IBM Directory use the Server Administration, which lists the following configuration settings:

    Only SSL
    Clients are not permitted to conduct non-secure communications. This is the most secure way to configure your server.

    SSL On
    Clients are permitted to conduct either secure or unsecure communications.

    SSL Off
    Clients are permitted to conduct only unsecure communications.

    Secure port number to use
    The default is 636.

    Authorization type
    Can be set to server authentication, or client and server authentication. The default is server authentication, where SSL authenticates the server to the client.

    Key database file specification
    Fully-qualified file specification of the key database file. If a password stash file is defined, it is assumed to have the same file specification, with an extension of .sth.

    Key label
    The administrator-defined key label indicating what part of the key database to use.

    Key database password
    If a password stash file is not being used, the password for the key database file must be specified here.

    Server Certificate from an External Certificate Authority (CA)

    In order to provide a secure connection between IBM Directory and its clients, the server must have an X.509 certificate and a private key.

    The steps required to generate a private key, obtain the required server certificate from an external certificate authority (CA), and prepare them for use by the IBM Directory are outlined in the following:

    1. Logon as administrator or root.
    2. Change to the directory where you wish to create the key database file and where your private key and certificate will be stored.
    3. Run gsk5ikm to create a new key database file. You may use any valid value for the key database file name that you want. Whatever file name you use, you will need to provide it later when configuring the LDAP server to use SSL. Providing a full path name is recommended. The gsk5ikm utility will be used to generate a private-public key pair and a certificate request. SeeAppendix B, Using gsk5ikm for additional information.
    4. If VeriSign is your external CA, obtain a certificate from VeriSign, as follows:
      1. Access the following VeriSign Web site: http://digitalid.verisign.com/server_ids.html
      2. Click on IBM Internet Connection Servers.
      3. After reviewing the information at this site, click on Begin.
      4. Provide the required information and follow the steps required to request your server certificate. VeriSign is the primary Certification Authority supported for obtaining externally generated, high-assurance server certificates.
    5. If you have another CA that you want to use, you follow the directions for that CA to submit the contents of the certificate request file to them.

    When you receive the resulting certificate from the certificate authority (CA):

    1. Logon using your server identity.
    2. Change to the directory where you created the key database file.
    3. Place the signed certificate from the CA into a file in this directory. The file will be used in the next step.
    4. From the same directory, run gsk5ikm to receive the certificate into your key database file.
    5. Access the LDAP server's web administrative interface, and configure the various SSL parameters (including the file specification for the key database file). See Configuring SSL for LDAP.
    6. If you have more than one certificate in the key database file, the certificate you wish to use for IBM Directory must be the default.
    7. Start the IBM Directory.
    Note:
    If you instruct gsk5ikm to save the password in a password stash file, it is not necessary to change or set the password in the slapd32.conf file.

    Using a Self-Signed Server Certificate

    If you are using the IBM Directory in an intranet environment, use gsk5ikm to create your own server certificates. You can also use gsk5ikm to test IBM Directory with SSL without purchasing a VeriSign high-assurance server certificate. These types of certificates are known as self-signed certificates.

    Follow these steps to create a key database file using self-signed certificates.

    1. On each server:
      1. Change to the directory where you wish to create the key database file and where your private key and certificate is to be stored.
      2. Create a new key database file and the self-sign certificate request that is to be used as your CA certificate.
        • Use the largest key size available.
        • Use a secure server certificate, not a low-assurance certificate.
      3. Obtain the certificate request file and the certificate is put into the key database file automatically by the gsk5ikm tool.
    2. If you are using an application created for the client, do the following on each client machine:
      1. Place the CA certificate request file in an accessible location on the client machine.
      2. Receive the CA certificate request file into the client's key database.
      3. Mark the received certificate as a trusted root.

    See Appendix B, Using gsk5ikm for additional information.

    Notes:

    1. You must always receive the CA certificate into the server's key database file and mark it as a trusted root before receiving the server certificate into the server's key database file.

    2. Whenever you use gsk5ikm to manage the IBM Directory server's key database file, remember to change to the directory in which the key database file exists.

    3. Each IBM Directory server should have its own private key and certificate. Sharing the private key and certificate across multiple IBM Directory servers increases security risks. By using different certificates and private keys for each server, security exposure is minimized if a key database file for one of the servers is compromised.

    Setting up Your LDAP Client to Access IBM Directory

    The following steps are required to create a key database file for an LDAP client that contains one or more self-signed server certificates that are marked as 'trusted' by the client. The process can also be used to import CA certificates from other sources (such as VeriSign) into the client's key database file for use as trusted roots. A trusted root is simply an X.509 certificate signed by a trusted entity (VeriSign, for example, or the creator of a self-signed server certificate), imported into the client's key database file, and 'marked' as trusted.

    1. Copy the server's certificate file (cert.arm) to your client workstation
    2. Run gsk5ikm to create a new client key database file or to access an existing one. For a new client key database, choose a file name associated with the client for ease of management. For example, if the LDAP client runs on Fred's machine, you might choose to name the file FRED.KDB
    3. If adding server's certificate to the existing client key database:
      1. Click Key Database File menu bar and select Open.
      2. Enter the path and name of the existing key database file then click OK.
      3. Enter the password.
      4. Ensure Signer Certificates is chosen and Click on Add.
      5. Enter the name and location of the server's certificate file
      6. Enter a label for the server certificate entry in the client's key database file, for example, 'Corporate Directory Server' then click OK.
    4. If creating the new Client key database:
      1. Click Key DataBase File of menu bar and select New.
      2. Enter the name and location for the new Client Key DataBase file, then click OK.
      3. Enter the password
      4. After the new client key database is created, repeat the previous steps for adding server's certificate to the existing key database file.
    5. Exit gsk5ikm.

    See Appendix B, Using gsk5ikm for additional information.

    When the LDAP client creates a secure SSL connection with the server, it now uses the server's self-signed certificate to verify that it is connecting to the proper server.

    Repeat the preceding steps for each IBM Directory server that the LDAP client needs to connect to in a secure fashion.


    Configuring Server Encryption Ciphers

    The following is a list of the ciphers supported:

    SSL Version
    By default the SSL version of IBM Directory server uses the following list of ciphers when performing cipher negotiation with the client (during the SSL handshake):

    These ciphers are stored in the configuration file using the sslCipherSpecs keyword as the decimal representation of the sum of the values defined above. For example, to use only Triple DES, the value is 256. In this case, only clients that also support Triple DES would be able to establish an SSL connection with the server.


    Migrate the Key ring file to Key database file

    To migrate the old key ring file which was created from MKKF utility, do the following steps:

    1. Start gsk5ikm.
    2. Click Key DataBase File of menu bar and select Open.
    3. Enter the path and filename of your key ring file then click OK.
    4. Enter the password of your key ring file. If the key ring file is created without a password, you MUST use the old MKKF to assign a password for it.
    5. After the old Key ring file is opened, click Key DataBase File of menu bar and select Save As
    6. Ensure key database type is set to CMS key database file. Fill out the name and location of the key database file, and then click OK.

    Client Authentication

    Client authentication provides for two-way authentication between the LDAP client and the LDAP server.

    With client authentication, the LDAP client must have a digital certificate (based on the X.509 standard). This digital certificate is used to authenticate the LDAP client to the IBM Directory Server.

    The Simple Authentication and Security Layer (SASL) can be used to add authentication support to connection protocols. A protocol includes a command for identifying and authenticating a user to a server. It can optionally negotiate a security layer for subsequent protocol interactions.

    After a server receives the authentication command or any client response, it may issue a challenge or indicate failure or completion. If a client receives a challenge it may issue a response or abort the exchange, depending on the profile of the protocol.

    During the authentication protocol exchange, the SASL mechanism performs authentication, transmits an authorization identity (known as userid) from the client to the server, and negotiates the use of a mechanism-specific security layer.

    When the LDAP server receives an LDAP bind request from a client, it processes the request in the following order:

    1. The server parses the LDAP bind request and retrieves the following information:
    2. The server normalizes the DN retrieved from the request.
    3. The server retrieves any LDAP control included with the LDAP bind request.
    4. If the method of authentication is SASL, the server determines whether or not the SASL mechanism (specified in the request) is supported. If the SASL mechanism is not supported by the server, the server sends an error return code to the client and ends the bind process.
    5. If the SASL mechanism is supported (=EXTERNAL) and the SSL authentication type is server and client authentication, the server verifies that the client's certificate is valid, issued by a known CA, and that none of the certificates on the client's certificate chain are invalid or revoked. If the client DN and password, as specified in the ldap_sasl_bind, are NULL, then the DN contained within the client's x.509v3 certificate is used as the authenticated identity on subsequent LDAP operations. Otherwise, the client is authenticated anonymously (if DN and password are NULL), or the client is authenticated based on the bind information provided by the client.
    6. If the method of authentication is Simple, the server checks to see if the DN is an empty string or if there are no credentials.
    7. If the DN is an empty string, or if the DN or no credentials are specified, the server assumes that the client is binding anonymously and returns a good result to the client. The DN and authentication method for the connection are left as NULL and LDAP_AUTH_NONE respectively.
    8. If the client has not bound beforehand, and does not present a certificate during the bind operation, the client is authenticated anonymously.

    Using Server Administration:

    1. If you have not done so already, click the arrow to the left of Security in the navigation area, then click the arrow to the left of SSL, then click Settings.
    2. Select the SSL status.
    3. Select Server and Client Authentication.
    4. Enter the Secure port number. The default secure port is 636.
    5. Enter the Key database path and file name.
    6. Enter the Key label.
    7. Enter a Key password if there is no password stash file for the key database or if you want to override an existing password stash.
    8. If you entered a Key password, enter the password again in Confirm password to confirm there are no typographical errors.
    9. Click Update.
    10. After a message displays the settings were successfully updated, you must restart the server using the Restart icon in the upper right corner for the changes to take effect.

    Using the command line - required for the Linux and HP-UX operating systems:

    When using SSL to secure LDAP communication with the IBM Directory server with client authentication mechanism, you can manually edit the slapd32.conf file under the cn=SSL, cn=Configuration entry to add the new line:

    ibm-slapdSSLAuth: serverclientauth
    

    Kerberos

    The IBM Directory supports Kerberos Version 1.2 servers, such as the IBM Network Authentication Service, on AIX servers and clients, and Windows NT and Windows 2000 clients only.


    Using Kerberos authentication

    Note:
    You must have a Kerberos client installed to use Kerberos authentication.

    Using Server Administration:

    If you have not done so already, click the arrow to the left of Security in the navigation area, then click Kerberos.

    To enable Kerberos authentication:

    1. Select Yes for Enable kerberos authentication.
    2. Select Yes if you want to Map kerberos ID's to LDAP DN's. See Identity mapping for Kerberos
    3. Enter the Kerberos realm using the format hostName.domainName, for example, TEST.AUSTIN.IBM.COM.
    4. Enter the path and file name of the Kerberos keytab file.
    5. Enter the Administrator ID using the format ibm-kn=value@realm, for example, ibm-kn=root@TEST.AUSTIN.IBM.COM.
    6. Click Update.
    7. You must restart the server using the Restart icon in the upper right corner for the changes to take effect.

    Using the command line:

    Before you can us the command line for Kerberos authentication, you need to do a Kerberos initialization. Issue the following command:

    kinit <kerberos_principlename>@<realm_name>
    

    To use Kerberos authentication you must specify the -m option with the GSSAPI parameter on the ldapadd and ldapsearch commands. For example:

    ldapsearch  -V 3 -m GSSAPI -b <"cn=us"> objectclass=*
    

    Identity mapping for Kerberos

    Identity mapping enables the directory administrator to use the existing set of ACL data with the Kerberos authentication method. The ACL for the IBM Directory is based on the Distinguished Name (DN) assigned to the client connected to the directory server. The access rights are based on what permissions have been granted for that DN and the permissions for any groups containing that DN as a member. If the bind method for GSSAPI is used (that is, Kerberos is used for authenticating to the server), the DN is something like IBM-KN=your_principal@YOUR_REALM_NAME. This type of DN can be used as members of access groups or access IDs. You can also use the Kerberos Identity Mapping feature to grant access rights for this DN to an entry already in the directory.

    For example, if there is an entry in the directory for Reginald Bender:

    dn: cn=Reginald Bender, ou=internal users, o=SecureWay.com, c=US
    objectclass: top
    objectclass: person
    objectclass: organizationalperson
    cn: Reginald Bender
    sn: Bender
    aclentry: access-id:CN=THIS:critical:rwsc
    aclentry: group:CN=ANYBODY:normal:rsc
    userpassword: cL1eNt
    

    The access rights for this entry allow anyone binding with the DN "cn=Reginald Bender, ou=internal users, o=SecureWay.com, c=US" to view critical data such as the password, but no one else.

    If Reginald Bender used Kerberos to bind to the server, his DN could be something like IBM-KN=rbender@SW.REALM_1. If identity mapping is not enabled on the server, he is not allowed to view his own entry's password.

    If identity mapping is enabled, he can view the password if this entry were changed to include:

    dn: cn=Reginald Bender, ou=internal users, o=SecureWay.com, c=US...
    objectclass: ibm-securityidentities
    altsecurityidentities: Kerberos:rbender@SW.REALM_1
    

    When Reginald Bender binds to the directory server, the server first searches the whole directory to determine if the directory is a KDC (Key Distribution Center) account registry. If it is not, the server searches the directory for any entry containing an altsecurityidentities attribute with a value matching the Kerberos user principal and realm. In this example, rbender is the user principal and SW.REALM_1 is the realm. This is the default for the Kerberos identity mapping. The bind fails if more than one entry has an attribute with this value. The mapping must be one-to-one. If the mapping is successful, Reginald Bender has all of the access rights for "cn=Reginald Bender, ou=internal users, o=SecureWay.com, c=US", including any access groups that has this as a member.

    The IBM Directory server can be used to contain Kerberos account information (krbRealmName-V2 = <realm_name> and krbPrincipalName = <princ_name>@<realm_name>) to serve as the backing store for a KDC.

    The server with Kerberos identity mapping enabled first searches the directory for entries with objectclass krbRealm-V2 and krbRealmName-V2 =<realm_name>, such as:

    dn: krbRealmName-V2=SW.REALM_1, o=SecureWay.com, c=US
    objectclass:  krbRealm-V2
    krbReamlName-V2: SW.REALM_1
    

    If no entries are found, the server uses the default Kerberos identity mapping described previously. If more than one entry is found, the bind fails.

    However, if the directory contains the single entry:

    dn: krbRealmName-V2=SW.REALM_1, ou=Group, o=SecureWay.com, c=US
    objectclass:  krbRealm-V2
    krbRealmName-V2: SW.REALM_1
    krbPrincSubtree: ou=internal users,o=SecureWay.com, c=US
    krbPrincSubtree: ou=external users,o=SecureWay.com, c=US
    

    The server searches each subtree listed as a value of krbPrincSubtree for an entry with an attribute krbPrincipalName.

    In this release, for identity mapping to work for Reginald Bender, you need to add two attributes to the "cn=Reginal Bender, ou=internal users, o=SecureWay.com, c=US" entry:

    objectclass: extensibleObject
    krbPrincipalName: rbender@SW.REALM_1
     
    

    Depending on whether the directory is a KDC account registry, the final entry is:

    dn: cn=Reginald Bender, ou=internal users, o=SecureWay.com, c=US...
    objectclass: ibm-securityidentities
    altsecurityidentities: Kerberos:rbender@SW.REALM_1...
     
    

    or for a KDC account registry:

    dn: cn=Reginald Bender, ou=internal users, o=SecureWay.com, c=US ...
    objectclass: extensibleObject
    krbPrincipalName: rbender@SW.REALM_1
    

    In either case, the client is mapped to "cn=Reginald Bender, ou=internal users, o=SecureWay.com, c=US".

    If a DN is not mapped because no entry is found, the mapping fails but the bind is still successful. However, if more than one DN is mapped, the bind fails.

    Identity mapping enables the existing ACLs to work with Kerberos authentication. A client using Kerberos with a mapped identity has two distinct identities, both of which are evaluated in granting access.

    Identity mapping has some costs. The internal searches at bind time impact performance and identity mapping requires additional setup to add the appropriate attributes to the entries to be mapped.

    In this release, if default identity mapping is used, the administrator (either Kerberos or LDAP) must make sure that the data in the KDC and the data in the LDAP server are synchronized. If the data is not synchronized, incorrect results might be returned because of incorrect ACL evaluation.

    Note:
    The object class, such as KrbPrincipal and the attributes such as KrbPrincSubtree, KRbAliasedObjectName, and KrbHintAliases are used to define a IBM Directory as a Kerberos KDC. See the Kerberos documentation for more information.

    Directory Management


    IBM Directory Management Tool

    The IBM Directory Management Tool provides a graphical user interface that enables you to manage information stored in directory servers. Use the tool to:

    Note:
    The Directory Management Tool is intended for use with IBM Directory Server on AIX, Windows, Solaris, Linux (Intel-based distributions), and OS/400 operating systems. It might work with some other LDAP directories, but such use is not supported. The Directory Management Tool for the latest IBM Directory release (4.1) works with, and is supported for earlier SecureWay(R) 3.x releases. However, the converse is not true. Use the latest Directory Management Tool when communicating with the latest level of the IBM Directory.

    Starting and configuring

    The Directory Management Tool is an optionally installable part of the client package of the IBM Directory Server Version 4.1 product.

    Starting the Directory Management Tool

    To start the tool, type dmt in a command window. The dmt command has an optional parameter:

    -f
    The -f flag overrides the default dmt.conf configuration file and specifies the fully qualified path and filename of another configuration file. You can configure the tool to automatically connect to one or more servers and to log in particular Distinguished Names (DNs) when it is started, for example,
    dmt -f c:\temp\dmtservers.conf
    
    Note:
    If you are using a Windows system, you can also start the tool from the Start menu (Start-->Programs-->IBM Directory 4.1-->Directory Management Tool).

    Configuring the Directory Management Tool

    To configure the Directory Management Tool, edit the configuration file located at <installation directory>/etc/dmt.conf. For example, if you edit the file to contains these lines:

    server1.url=ldap://ldapsrv.austin.ibm.com:389
    server1.security.bindDN=cn=admin
    server1.security.password=secret
    server1.security.ssl.keyclass=
    

    When started, the tool connects to the non-SSL port 389 of a directory server at machine ldapsrv.austin.ibm.com. It logs in to the server as DN: cn=admin using password secret.

    Multiple servers can be specified in the configuration file. For example:

      server2.url=ldaps://localhost.austin.ibm.com:636
      server2.security.bindDN=cn=admin
      server2.security.password=secret
      server2.security.ssl.keyclass=localhost
     
    

    If you do not want to keep a clear password in the configuration file in an unprotected directory, leave the principal name empty to perform an initial bind to the server as an anonymous user, then rebind with the correct DN. If the tool is started without default servers and login users defined in the configuration file, use the Add server button to add servers. If Secure Socket Layer (SSL) is used, specify the proper keyclass file. The keyclass file contains certificate information.

    Note:
    If SSL is used, you must have the GSKit package installed on the server.

    After the tool has been started the, the application window has four parts:

    Navigation area
    The navigation area displays expandable categories for various server content tasks.

    Server tabs
    Tabs for connected servers are displayed at the top of the navigation area allowing management of multiple directory servers from a single interface.

    Work area
    The work area displays the tasks associated with the selected task in the navigation area. For example, if Browse tree is selected in the navigation area, the work area displays the directory tree and a toolbar containing tasks related to working with directory entries.

    Status area
    The status area, located at the top of the work area, contains the title of the selected task, system messages, and a link to the help.

    Working with servers

    You can use the Directory Management Tool to:

    Connecting to a server

    When the Directory Management Tool is started, connections are made to the servers specified in the configuration file. If a directory User DN and password are not provided in the Directory Management Tool configuration file, the connection to the server is anonymous. Anonymous users can browse the directory tree and schema, but in most instances cannot perform directory updates.

    Adding a User DN and password to the configuration file enables you to connect to the specified server as the specified user every time you launch the Directory Management Tool. The default configuration file is <ldap>/etc/dmt.conf.

    For example, adding:

        server1.url=ldap://test.ibm.com:389
        server1.security.bindDN=cn=root
        server1.security.password=secret       
    

    to dmt.conf connects to the server test.ibm.com as user cn=root with the password secret.

    To reconnect to an already connected server as a different user,

    1. If you have not already done so, expand the Server category in the navigation area, then click Rebind.

    If you select Authenticated but do not enter a User DN, the connection defaults to Anonymous.

    Viewing server status

    To view the server status, expand the Server category in the navigation area, then click Status.

    The status panel displays:

    Viewing server properties

    If you have not done so already, expand the Server category in the navigation area, then click Properties.

    The current bind DN, subschema entry, supported LDAP protocol versions, and the naming contexts that the server holds are displayed.

    Adding a server

    Note:
    The number of servers that you can add is limited by the amount of memory on your machine. If you have 256 MB of memory on your machine, you can have 10 servers. You might be able to add additional servers, but you run the risk of getting a Java memory error message. If you get such a message, you must shut down the Directory Management Tool ( press Ctrl C in the command window).

    The Directory Management Tool displays servers as tabs at the top of the navigation area. Each tab displays the name of the associated directory server and an icon to indicate if the server is a:

    To add a new server, click Add server at the bottom of the navigation area.

    1. Enter the Server name. Use either the IP address in quadruple format, for example, 9.53.92.149, or the domain name in the format hostname.domainname, for example, TEST.AUSTIN.IBM.COM.
    2. Enter the required Port for the server.

      Depending upon whether you are connecting to the server using Secure Sockets Layer (SSL) and the type of authentication you select, you are prompted for additional information.

      If you want to connect to the server without using SSL:

      1. Do not select the Use SSL checkbox.
      2. Select an Authentication type
        Note:
        SASL EXTERNAL is not available without SSL.
        • If you select None,no additional information is required.
        • If you select Simple or CRAM MD5:
          1. Enter the User DN - The DN used to connect to the server. If no User DN is specified, the connection is anonymous.
          2. Enter the User Password - The password used to provide access to the server if you specified a User DN.

      If you want to connect to the server using SSL:

      Note:
      Because IBM now uses the jndi from Sun Microsystems(TM), you must first connect the Directory Management Tool to SSL. To find out how to do this see Connecting to SSL before proceeding.
      1. Select the Use SSL checkbox.
      2. Select an Authentication type
        • If you select None or SASL External:
          1. Enter the Keystore filename - The fully qualified path to a client-side certificate file name which is used for mutual (server and client) authentication.
          2. Enter the Keystore file password - The password for the Keystore file.
          3. Enter the Keystore file type - The keystore file format for example, jks, pkcs12, and so forth.
          4. Enter the Truststore file name - The fully qualified path to a trusted CA certificates database file.
          5. Enter the Truststore file password - The password for the Truststore file.
          6. Enter the Truststore file type - The truststore file format for example, jks, pkcs12, and so forth.
        • If you select Simple or CRAM MD5:
          1. Enter the User DN - The DN used to connect to the server. If no User DN is specified, the connection is anonymous.
          2. Enter the User Password - The password used to provide access to the server if you specified a User DN.
          3. Enter the Keystore filename - The fully qualified path to a client-side certificate file name which is used for mutual (server and client) authentication.
          4. Enter the Keystore file password - The password for the Keystore file.
          5. Enter the Keystore file type - The keystore file format for example, jks, pkcs12, and so forth.
          6. Enter the Truststore file name - The fully qualified path to a trusted CA certificates database file.
          7. Enter the Truststore file password - The password for the Truststore file.
          8. Enter the Truststore file type - The truststore file format for example, jks, pkcs12, and so forth.
    3. Click OK to add the server, if you selected an authentication of none or simple you can click Save to save the server information to the dmt.conf file, or click Cancel to return to Browse tree without saving changes. To make changes to an existing server, delete the server, then add a new server with the updated information.

    Connecting to SSL

    To enable SSL on the Directory Management Tool you must perform the following.

    Notes:

    1. You can select to use several key database types. The following procedure is based on selecting the jks format. If you select a different format, the steps might vary. For additional information on the Java Secure Socket Extension (JSSE), or the Java Cryptography Extension (JCE) see the IBM Directory Web site at http://www-306.ibm.com/software/network/directory/library/ .

    2. On the AIX operating systems, if you are prompted to set JAVA_HOME, you can set it to either the system-installed Java or the Java version included with the IBM Directory Server. If you use the IBM Directory Server version, you also need to set the LIBPATH environment variable as follows:
        export LIBPATH=/usr/ldap/java/bin:/usr/ldap/java/bin/classic:$LIBPATH
       
      

    On the SSL server:

    1. Start gsk5ikm.
      gsk5ikm
      
    2. Create a new key database. Click KeyDatabase File -> New.
    3. Fill in the following fields:
    4. Click OK.
    5. Enter a password. <password>
    6. Confirm the password. <password>
    7. Click OK.
    8. Use the pull-down menu in the middle of the screen and select Personal Certificates.
    9. Click the New Self Signed button and fill in the following fields:

      Use the default settings for all the other fields.

    10. Click OK.
    11. Select ldapw2k7 in the list of personal certificates. Click the Extract Certificate button and fill in the following fields:
    12. Click OK.
    13. FTP ldapw2k7.arm to a client system.

    On the client:

    1. Start the ikeyman tool:
      1. Move c:\program files\ibm\ldap\jre\lib\ext\ibmjcaprovier.jar to a different directory.
      2. Edit c:\program files\ibm\ldap\jre\lib\security\java.security file to modify the statement security.provider.2=com.ibm.crypto.provider.IBMJCA to security.provider.2=com.ibm.crypto.provider.IBMJCE
      3. Go to the directory d:\program files\ibm\ldap\jre\bin or modify PATH to ensure that the java executable in d:\program files\ibm\ldap\jre\bin is used in this session.
      4. Enter the following command to start ikeyman tool:
        java com.ibm.ikeyman.Ikeyman
        
    2. Create a new key database. Click KeyDatabase File -> New.
    3. Fill in the following fields:
    4. Click OK.
    5. Enter a password <password>.
    6. Confirm the password <password>.

      Use the default settings for all the other fields.

    7. Click OK.
    8. Use the pull-down menu in the middle of the screen and select Signer Certificates.
    9. Click the Add button and fill in the following fields:
    10. Click OK.
    11. Enter a label: ldapw2k7
    12. Click OK.
    13. Use the pull-down menu in the middle of the screen and select Personal Certificates.
    14. Click the New Self Signed button and fill in the following fields:
    15. Click OK.
    16. Select <name> in the list of personal certificates and click View/Edit. Write down the Serial Number : (for example, 10:13:11:16:47)
    17. Select <name> in the list of personal certificates and click the Extract Certificate button and fill in the following fields:
    18. Click OK.
      Note:
      You might have to click KeyDatabase File-> Save as to save the data without exiting the ikeyman tool.
    19. FTP <name>.arm to the server system.
    20. Move jcaprovider.jar back to its original location, d:\program files\ibm\ldap\jre\lib\ext\.

    On the SSL Server:

    1. Start gsk5ikm.
      gsk5ikm
      
    2. Open c:\program files\ibm\ldap\etc\keyrings\ldapw2k7.kdb
    3. Use pull-down menu in the middle of screen and select Signer certificates.
    4. Click the Add button and fill in the following fields:
    5. Click OK.
    6. Enter a label: <name>
    7. Click OK.
    8. Stop and restart the server, if necessary.

    See Appendix B, Using gsk5ikm for more information.

    Deleting a server

    The Directory Management Tool displays server as tabs at the top of the navigation area. Each tab displays the name of the associated directory server. To delete a server:

    1. Click Delete server at the bottom of the navigation area.
    2. Select a server to delete. Delete multiple servers using the Ctrl key.
    3. Click Delete to delete the selected servers.

    Starting server administration from the Directory Management Tool

    IBM Directory Server Administration is a web-based interface through which you can setup and maintain an LDAP server and its backend database.

    If you have not already done so, expand the Server category in the navigation area.

    1. Click Administration.
    2. Select a Web server protocol.
    3. Enter the Web server name in the format hostname.domainname, for example, testserver.ibm.com.
    4. Enter the Web server port. Unless a port is specified, the default port is 80.
    5. Click OK. A Web browser launches with the Web address of the Server Administration interface for the selected server. Consult the logon help for additional information.
    6. Enter the Admin ID created during LDAP configuration, for example, cn=root.
    7. Enter the Password associated with the Admin ID.
    8. Click Logon.

    For additional information, see Server Administration graphical user interface.


    Using the toolbar

    Three tasks display a toolbar at the top of the work area. The toolbar, be default, displays icons and text. You can modify the toolbar settings to display only icons or only text by editing the configuration file. The default configuration file is dmt.conf.

    To edit the configuration file:

    1. Open the configuration file in a text editor.
    2. Change the value of toolbar to either icon to display only icons or text to display only text. The default value for toolbar is both, which displays text and icons.
    3. Save and close the configuration file.
    4. You must restart the directory management tool for the changes to take effect.

    The toolbar contains a series of icons depending on the task selected in the navigation area.

    The Browse tree toolbar displays:

    The View object classes toolbar displays:

    The View object classes toolbar also contains a Sort by drop-down list. The default sort order for object classes is by object class name. You can also sort by:

    Inheritance
    To sort by inheritance based on Superior object class.

    Type
    To sort by object class type (structural, auxiliary, or abstract).

    The View attributes toolbar displays:

    The View attributes toolbar also contains a Sort by drop-down list. The default sort order for attributes is by attribute name. You can sort by:

    Syntax
    To sort by attribute syntax, for example, to display all the attributes that use the Binary syntax.

    Association
    To sort by which object classes use specific attributes.

    Inheritance
    To sort by inheritance based on Superior attribute.

    See the Directory Management Tool online helps for additional information.


    Browsing the tree

    If you have not done so already, expand the Directory tree category in the navigation area, then expand Browse Tree.You can expand the various subtrees and select the entry that you want to work on. You can choose the operation you want to perform from the tool bar.


    Access Control Lists

    Access Control Lists (ACL) provide a means to protect information stored in a LDAP directory. Administrators use ACLs to restrict access to different portions of the directory, or specific directory entries. LDAP directory entries are related to each other by a hierarchical tree structure. Each directory entry (or object) contains the distinguished name of the object as well as a set of attributes and their corresponding values.

    The object attributes associated with access control, such as owner, ownerSource,ownerPropagate, acl, aclSource and aclPropagate are unusual in that they are logically associated with each object, but can have values that depend upon other objects higher in the tree. Depending upon how they are established, these attribute values can be explicit to an object or inherited from an ancestor.

    The access control model defines two sets of attributes: The Access Control Information (ACI) and the entryOwner Information. The ACI specifically defines a subject's permission to perform a given operation against certain LDAP objects. The entryOwner information controls which subjects can define the ACIs. The entryOwnership also acquires full access rights to the target object.

    Using ACL, administrators can restrict access to different portions of the directory, specific directory entries and, based on the attribute name or attribute access class, the attributes contained in the entries. Each entry within the LDAP directory has a set of associated ACI. In conformance with the LDAP model, the ACI and entryOwner information is represented as attribute-value pairs. Furthermore, the ldif syntax is used to administer these values. The attributes are:


    The Access Control Attribute Syntax

    Each of these attributes can be managed using LDIF notation. The following defines the syntax for the ACI and entryOwner attributes using baccus naur form (BNF).

     <aclEntry> ::=  <subject> [ ":"  <rights> ] 
     
       <aclPropagate> ::=  "true" | "false" 
     
       <entryOwner> ::=  <subject> 
     
       <ownerPropagate> ::= "true" | "false" 
     
       <subject> ::= <subjectDnType> ':' <subjectDn> | 
                            <pseudoDn> 
     
       <subjectDnType> ::= "role" | "group" | "access-id" 
     
       <subjectDn> ::= <DN> 
     
       <DN> ::= distinguished name as described in RFC 2251, section 4.1.3. 
     
       <pseudoDn> ::= "group:cn=anybody" | "group:cn=authenticated" | 
                             "access-id:cn=this" 
     
       <rights> ::= <accessList> [":" <rights> ] 
     
       <accessList> ::=  <objectAccess> | <attributeAccess> | 
                                <attributeClassAccess> 
     
       <objectAccess> ::= "object:" [<action> ":"]  <objectPermissions> 
     
       <action> ::= "grant" | "deny" 
     
       <objectPermisssions> ::=  <objectPermission> [ <objectPermissions> ] 
     
       <objectPermission> ::= "a" | "d" |  "" 
     
       <attributeAccess> ::= "at." <attributeName> ":" [<action> ":"]  
                                    <attributePermissions> 
     
       <attributeName> ::= attributeType name as described in RFC 2251, 
                                  section 4.1.4. 
                                  (OID or alpha-numeric string with leading alphabet, 
                                   "-" and ";" allowed) 
     
       <attributePermissions> ::=  <attributePermission> 
                                       [<attributePermissions>] 
     
       <attributePermission> ::=  "r" | "w" | "s" | "c" |  "" 
     
       <attributeClassAccess> ::= <class> ":" [<action> ":"] 
                                         <attributePermissions> 
     
       <class> ::= "normal" | "sensitive" | "critical" 
      
     
    

    AclEntry

    Subject

    A subject (the entity requesting access to operate on an object) consists of the combination of a DN (Distinguished Name) type and a DN. The valid DN types are: access Id, Group and Role.

    The DN identifies a particular access-id, role or group. For example, a subject might be access-id: cn=personA, o=IBM or group: cn=deptXYZ, o=IBM.

    Because the field delimiter is the colon ( : ), a DN containing colons must be surrounded by double-quotation marks ( "" ). If a DN already contains characters with double-quotation marks, these characters must be escaped with a backslash (\).

    All directory groups can be used in access control.

    Note:
    Any group of AccessGroup, GroupOfNames, GroupofUniqueNames, or groupOfURLs structural objectclasses or the ibm-dynamicGroup, ibm-staticGroup auxillary objectclasses can be used for access control.

    Another DN type used within the access control model is role. While roles and groups are similar in implementation, conceptually they are different. When a user is assigned to a role, there is an implicit expectation that the necessary authority has already been set up to perform the job associated with that role. With group membership, there is no built in assumption about what permissions are gained (or denied) by being a member of that group.

    Roles are similar to groups in that they are represented in the directory by an object. Additionally, roles contain a group of DNs. Roles that are used in access control must have an objectclass of AccessRole.

    Pseudo DN

    The LDAP directory contains several pseudo DNs. These are used to refer to large numbers of DNs which at bind time share a common characteristic, in relation to either the operation being performed, or the target object on which the operation is being performed.

    Currently, three pseudo DNs are defined:

    group:cn=anybody
    Refers to all subjects, including those that are unauthenticated. All users belong to this group automatically.

    group:cn=authenticated
    Refers to any DN which has been authenticated to the directory. The method of authentication is not considered.

    access-id:cn=this
    Refers to the bindDn which matches the target object's DN on which the operation is performed.

    Rights

    Access rights can apply to an entire object or to attributes of the object. The LDAP access rights are discrete. One right does not imply another right. The rights may be combined together to provide the desired rights list following a set of rules discussed later. Rights can be of an unspecified value, which indicates that no access rights are granted to the subject on the target object. The rights consist of three parts:

    Action:
    Defined values are grant or deny. If this field is not present, the default is set to grant.

    Permission:
    There are six basic operations that may be performed on a directory object. From these operations, the base set of ACI permissions are taken. These are: add an entry, delete an entry, read an attribute value, write an attribute value, search for an attribute, and compare an attribute value.

    The possible attribute permissions are : read ( r ), write ( w ), search ( s ), and compare ( c ). Additionally, object permissions apply to the entry as a whole. These permissions are add child entries ( a ) and delete this entry ( d ).

    The following table summarizes the permissions needed to perform each of the LDAP operations.

    Table 5.

    Operation Permission Needed
    ldapadd add (on parent)
    ldapdelete delete (on object)
    ldapmodify write (on attributes being modified)
    ldapsearch
    • search, read (on attributes in RDN)
    • search (on attributes specified in the search filter)
    • search (on attributes returned with just names)
    • search, read (on attributes returned with values)

    ldapmodrdn write (on RDN attributes)
    ldapcompare compare (on compared attribute)
    Note:
    For search operations, the subject is required to have search (s) access to all the attributes in the search filter or no entries are returned. For returned entries from a search, the subject is required to have search (s) and read (r) access to all the attributes in the RDN of the returned entries or these entries are not returned.

    Access Target:
    These permissions can be applied to the entire object (add entry, delete entry), to an individual attribute within the entry, or can be applied to groups of attributes (Attribute Access Classes) as described in the following.

    Attributes requiring similar permissions for access are grouped together in classes. Attributes are mapped to their attribute classes in the directory schema file. These classes are discrete; access to one class does not imply access to another class. Permissions are set with regard to the attribute access class as a whole. The permissions set on a particular attribute class apply to all attributes within that access class unless the individual attribute access permissions are specified.

    IBM defines three attribute classes that are used in evaluation of access to user attributes: normal, sensitive, and critical. For example, attribute commonName falls into the normal class, and attribute userpassword belongs to the critical class. User defined attributes belong to the normal access class unless otherwise specified.

    Two other access classes are also defined: system and restricted. The system class attributes are creatorsName, modifiersName, createTimestamp, modifyTimestamp, ownerSource and aclSource. These are attributes maintained by the LDAP server and read only to the directory users. OwnerSource and aclSource are described in the Propagation section. The attributes that define the access control, namely aclEntry, aclPropagate, entryOwner and ownerPropagate, are in the restricted class. All users have read access to the restricted attributes but only entryOwners can create, modify, and delete these attributes.


    EntryOwner

    The entry owners have complete permissions to perform any operation on the object regardless of the aclEntry. Additionally, the entry owners are the only ones who are permitted to administer the aclEntries for that object. EntryOwner is an access control subject, it can be defined as individuals, groups or roles.

    Note:
    The directory administrator is one of the entryOwners for all objects in the directory by default, and the directory administrator's entryOwnership can not be removed from any object.

    Propagation

    Entries on which an aclEntry has been placed are considered to have an explicit aclEntry. Similarly, if the entryOwner has been set on a particular entry, that entry has an explicit owner. The two are not intertwined, an entry with an explicit owner may or may not have an explicit aclEntry, and an entry with an explicit aclEntry might have an explicit owner. If either of these values is not explicitly present on an entry, the missing value is inherited from an ancestor node in the directory tree.

    Each explicit aclEntry or entryOwner applies to the entry on which it is set. Additionally, the value might apply to all descendants that do not have an explicitly set value. These values are considered propagated; their values propagate through the directory tree. Propagation of a particular value continues until another propagating value is reached.

    AclEntry and entryOwner can be set to apply to just a particular entry with the propagation value set to "false", or an entry and its subtree with the propagation value set to "true". Although both aclEntry and entryOwner can propagate, their propagation is not linked in anyway.

    The aclEntry and entryOwner attributes allow multi-values, however, the propagation attributes (aclPropagate and ownerPropagate) can only have a single value for all aclEntry or entryOwner attribute values within the same entry.

    The system attributes aclSource and ownerSource contain the DN of the effective node from which the aclEntry or entryOwner are evaluated, respectively. If no such node exists, the value default is assigned.

    An object's effective access control definitions can be derived by the following logic:


    Access Evaluation

    Access for a particular operation is granted or denied based on the subject's bind DN for that operation on the target object. Processing stops as soon as access can be determined.

    The checks for access are done by first finding the effective entryOwnership and ACI definition, checking for entry ownership, and then by evaluating the object's ACI values.

    By default, the directory administrator and the master server or the peer server (for replication) get full access rights to all objects in the directory except write access to system attributes. Other entryOwners get full access rights to the objects under their ownership except write access to system attributes. All users have read access rights to system and restricted attributes. These predefined rights cannot be altered. If the requesting subject has entryOwnership, access is determined by the above default settings and access processing stops.

    If the requesting subject is not an entryOwner, then the ACI values for the object entries are checked. The access rights as defined in the ACIs for the target object are calculated by the specificity and combinatory rules.

    Specificity Rule
    The most specific aclEntry definitions are the ones used in the evaluation of permissions granted/denied to a user. The levels of specificity are:

    Combinatory Rule
    Permissions granted to subjects of equal specificity are combined. If the access cannot be determined within the same specificity level, the access definitions of lesser specific level are used. If the access is not determined after all defined ACIs are applied, the access is denied.
    Note:
    After a matching access-id level aclEntry is found in access evaluation, the group level aclEntries are not included in access calculation. The exception is that if the matching access-id level aclEntries are all defined under cn=this, then all matching group level aclEntries are also combined in the evaluation.

    In other words, within the object entry, if a defined ACI entry contains an access-id subject DN that matches the bind DN, then the permissions are first evaluated based on that aclEntry. Under the same subject DN, if matching attribute level permissions are defined, they supersede any permissions defined under the attribute classes. Under the same attribute or attribute class level definition, if conflicting permissions are present, denied permissions override granted permissions.

    Note:
    A defined null value permission prevents the inclusion of less specific permission definitions.

    If access still can not be determined and all found matching aclEntries are defined under "cn=this", then group membership is evaluated. If a user belongs to more than one groups, the user receives the combined permissions from these groups. Additionally, the user automatically belongs to the cn=Anybody group and possibly the cn=Authenticated group if the user did an authenticated bind. If permissions are defined for those groups, the user receives the specified permissions.

    Note:
    Group and Role membership is determined at bind time and last until either another bind takes place, or until an unbind request is received. Nested groups and roles, that is a group or role defined as a member of another group or role, are not resolved in membership determination nor in access evaluation.

    For example, assume attribute1 is in the sensitive attribute class, and user cn=Person A, o=IBM belongs to both group1 and group2 with the following aclEntries defined:

    1. aclEntry: access-id: cn=Person A, o=IBM: at.attributel:grant:rsc:sensitive:deny:rsc
    2. aclEntry: group: cn=group1,o=IBM:critical:deny:rwsc
    3. aclEntry: group: cn=group2,o=IBM:critical:grant:r:normal:grant:rsc

    This user gets:

    For another example, with the following aclEntries:

    1. aclEntry: access-id: cn=this: sensitive
    2. aclEntry: group: cn=group1,o=IBM:sensitive:grant:rsc:normal:grant:rsc

    The user has:


    Defining the ACIs and Entry Owners

    The following two examples show an administrative subdomain being established. The first example shows a single user being assigned as the entryOwner for the entire domain. The second example shows a group assigned as the entryOwner.

                 entryOwner: access-id:cn=Person A,o=IBM 
                 ownerPropagate: true 
     
                 entryOwner: group:cn=System Owners, o=IBM 
                 ownerPropagate: true 
     
    

    The next example shows how a group "cn=Dept XYZ, o=IBM" is being given permissions to read, search and compare attribute1. The permission applies to the entire subtree below the node containing this ACI.

                 aclEntry: group:cn=Dept XYZ,o=IBM:at.attribute1:grant:rsc 
                 aclPropagate: true 
    

    The next example shows how a role "cn=System Admins,o=IBM" is being given permissions to add objects below this node, and read, search and compare attribute2 and the critical attribute class. The permission applies only to the node containing this ACI.

    aclEntry: role:cn=System Admins,
      o=IBM:object:grant:a:at.attribute2:grant:rsc:critical:grant:rsc 
    aclPropagate: false
    

    Modifying the ACI and Entry Owner Values

    Modify-replace
    Modify-replace works the same way as all other attributes. If the attribute value does not exist, create the value. If the attribute value exists, replace the value.

    Given the following ACIs for an entry:

    aclEntry: group:cn=Dept ABC,o=IBM:normal:grant:rsc 
    aclPropagate: true 
    

    perform the following change:

    dn: cn=some entry 
    changetype: modify 
    replace: aclEntry 
    aclEntry: group:cn=Dept XYZ,o=IBM:normal:grant:rsc 
     
    

    The resulting ACI is:

    aclEntry: group:cn=Dept XYZ,o=IBM:normal:grant:rsc 
    aclPropagate: true 
    

    ACI values for Dept ABC are lost through the replace.

    Modify-add
    During an ldapmodify-add, if the ACI or entryOwner does not exist, the ACI or entryOwner with the specific values is created. If the ACI or entryOwner exists, then add the specified values to the given ACI or entryOwner. For example, given the ACI:
     aclEntry: group:cn=Dept XYZ,o=IBM:normal:grant:rsc 
    

    with a modification:

    dn: cn=some entry 
    changetype: modify 
    add: aclEntry 
    aclEntry: group:cn=Dept ABC,o=IBM:at.attribute1:grant:rsc 
    

    would yield an multi-valued aclEntry of:

    aclEntry: group:cn=Dept XYZ,o=IBM:normal:grant:rsc 
    aclEntry: group:cn=Dept ABC,o=IBM:at.attribute1:grant:rsc 
    

    The permissions under the same attribute or attribute class are considered as the basic building blocks and the actions are considered as the qualifiers. If the same permission value is being added more than once, only one value is stored. If the same permission value is being added more than once with different action values, the last action value is used. If the resulting permission field is empty (""), this permission value is set to null and the action value is set to grant.

    For example, given the following ACI:

     aclEntry: group:cn=Dept XYZ,O=IBM:normal:grant:rsc 
     
    

    with a modification:

    dn: cn=some entry 
    changetype: modify 
    add: aclEntry 
    aclEntry: group:cn=Dept XYZ,o=IBM:normal:deny:r:critical:deny::sensitive
            :grant:r 
     
    

    yields an aclEntry of:

    aclEntry: group:cn=Dept XYZ,O=IBM:normal:grant:sc:normal:deny:r:critical
            :grant::sensitive:grant:r 
     
    

    Modify-delete
    To delete a particular ACI value, use the regular ldapmodify-delete syntax.

    Given an ACI of:

    aclEntry: group:cn=Dept XYZ,o=IBM:object:grant:ad 
    aclEntry: group:cn=Dept XYZ,o=IBM:normal:grant:rwsc 
     
    dn: cn = some entry 
    changetype: modify 
    delete: aclEntry 
    aclEntry: group:cn=Dept XYZ,o=IBM:object:grant:ad 
    

    yields a remaining ACI on the server of

    aclEntry: group:cn=Dept XYZ,o=IBM:normal:grant:rwsc 
     
    

    Deleting an ACI or entryOwner value that does not exist results in an unchanged ACI or entryOwner and a return code specifying that the attribute value does not exist.


    Deleting the ACI/Entry Owner Values

    With the ldapmodify-delete operation, the entryOwner can be deleted by specifying

    dn: cn = some entry 
    changetype: modify 
    delete: entryOwner 
     
    

    In this case, the entry would then have no explicit entryOwner. The ownerPropagate is also removed automatically. This entry would inherit its entryOwner from the ancestor node in the directory tree following the propagation rule.

    The same can be done to delete aclEntry completely:

    dn: cn = some entry 
    changetype: modify 
    delete: aclEntry 
    

    Deleting the last ACI or entryOwner value from an entry is not the same as deleting the ACI or entryOwner. It is possible for an entry to contain an ACI or entryOwner with no values. In this case, nothing is returned to the client when querying the ACI or entryOwner and the setting propagates to the descendent nodes until it is overridden. To prevent dangling entries that nobody can access, the directory administrator always has full access to an entry even if the entry has a null ACI or entryOwner value.


    Retrieving the ACI/Entry Owner Values

    The effective ACI or entryOwner values can be retrieved by simply specifying the desired ACL or entryOwner attributes in a search, for example,

    ldapsearch -b "cn=object A, o=ibm" -s base "objectclass=*"
        aclentry aclpropagate aclsource entryowner ownerpropagate ownersource
    

    returns all ACL or entryOwner information that is used in access evaluation on object A. Note that the returned values might not look exactly the same as they are first defined. The values are the equivalent of the original form.


    Working with Access Control Lists

    Follow these steps to use the Directory Management Tool utility to work with ACLs.

    1. If you have not done so already, expand the Directory tree category in the navigation area, then click Browse tree. See Browsing the tree if you need instructions.
    2. Select a directory entry. For example, cn=John Doe,ou=Advertising,o=ibm,c=US.
    3. Click the ACL icon on the toolbar.

    An entry can either have an explicitly defined ACL or inherit an ACL from a parent object.

    The ACL panel contains two tabs:

    After modifying the settings on the ACLs and Owners tabs, click OK to add the ACL to the selected entry.

    The ACLs tab contains four sections:

    The Owners tab contains two sections:


    Groups and roles


    Groups

    A group is a list, a collection of names. A groups can be used in aclentry and entryowner attributes to control access or in application-specific uses such as a mailing list; see Access Control Lists. Groups can be defined as either static, dynamic, or nested.

    Static groups

    A static group defines each member individually using the structural objectclass groupOfNames, groupOfUniqueNames, accessGroup, or accessRole; or the auxiliary objectclass ibm-staticgroup. These objectclasses require the attribute member (or uniqueMember in the case of groupOfUniqueNames). A static group using these structural objectclasses must have at least one member; it cannot be empty. A static group may also be defined using the auxiliary objectclass: ibm=staticGroup, which does not require the member attribute, and therefore may be empty.

    A typical group entry is:

    DN: cn=Dev.Staff,ou=Austin,c=US
     objectclass: accessGroup
     cn: Dev.Staff 
     member: cn=John Doe,o=IBM,c=US
     member: cn=Jane Smith,o=IBM,c=US
     member: cn=James Smith,o=IBM,c=US
    

    Each group object contains a multivalued attribute consisting of member DNs.

    Upon deletion of an access group, the access group is also deleted from all ACLs to which it has been applied.

    Dynamic groups

    A dynamic group defines its members differently than a static group. Instead of listing them individually, the dynamic group defines its members using an LDAP search. The dynamic group uses the structural objectclass groupOfURLs (or auxiliary objectclass ibm-dynamicGroup) and the attribute, memberURL to define the search using a simplified LDAP URL syntax.

     ldap:///<base DN of search> ? ? <scope of search> ? <searchfilter>
    
    Note:
    As the example illustrates, the host name must not be present in the syntax. The remaining parameters are just like normal ldap URL syntax. Each parameter field must be separated by a ?, even if no parameter is specified. Normally, a list of attributes to return would be included between the base DN and scope of the search. This parameter is also not used by the server when determining dynamic membership, and so may be omitted, however, the separator ? must still be present.
    where:

    base DN of search
    Is the point from which the search begins in the directory. It can be the suffix or root of the directory such as ou=Austin. This parameter is required.

    scope of search
    Specifies the extent of the search. The default scope is base.

    base
    Returns information only about the base DN specified in the URL

    one
    Returns information about entries one level below the base DN specified in the URL. It does not include the base entry.

    sub
    Returns information about entries at all levels below and includes the base DN.

    searchfilter
    Is the filter that you want to apply to the entries within the scope of the search. See the ldapsearch filter option for information about the syntax of the searchfilter. The default is objectclass=*

    The search for dynamic members is always internal to the server, so unlike a full ldap URL, a host name and port number is never specified, and the protocol is always ldap (never ldaps). The memberURL attribute may contain any kind of URL, but the server only uses memberURLs beginning with ldap:/// to determine dynamic membership.

    Examples

    A single entry in which the scope defaults to base and the filter defaults to objectclass=*:

    ldap:///cn=John Doe, cn=Employees, o=Acme, c=US
    

    All entries that are 1-level below cn=Employees, and the filter defaults to objectclass=*:

    ldap:///cn=Employees, o=Acme, c=US??one
    

    All entries that are under o-Acme with the objectclass=person:

    ldap:///o=Acme, c=US??sub?objectclass=person
    

    Depending on the object classes you use to define user entries, those entries might not contain attributes which are appropriate for determining group membership. You can use the auxiliary object class, ibm-dynamicMember, to extend your user entries to include the ibm-group attribute. This attribute allows you to add arbitrary values to your user entries to serve as targets for the filters of your dynamic groups. For example:

    The members of this dynamic group are entries directly under the cn=users,ou=Austin entry that have an ibm-group attribute of GROUP1:

    dn: cn=GROUP1,ou=Austin
     objectclass: groupOfURLs
     cn: GROUP1
     memberURL: ldap:///cn=users,ou=Austin??one?(ibm-group=GROUP1)
    

    Here is an example member of cn=GROUP1,ou=Austin:

    dn: cn=Group 1 member, cn=users, ou=austin
     objectclass: person
     objectclass: ibm-dynamicMember
     sn: member
     userpassword: memberpassword
     ibm-group: GROUP1
    

    Nested groups

    The nesting of groups enables the creation of hierarchical relationships that can be used to define inherited group membership. A nested group is defined as a child group entry whose DN is referenced by an attribute contained within a parent group entry. A parent group is created by extending one of the structural group object classes (groupOfNames, groupOfUniqueNames, accessGroup, accessRole, or groupOfURLs) with the addition of the ibm-nestedGroup auxiliary object class. After nested group extension, zero or more ibm-memberGroup attributes may be added, with their values set to the DNs of nested child groups. For example:

    dn: cn=Group 2, cn=Groups, o=IBM, c=US
     objectclass: groupOfNames
     objectclass: ibm-nestedGroup
     objectclass: top
     cn: Group 2
     description: Group composed of static, and nested members. 
     member: cn=Person 2.1, cn=Dept 2, cn=Employees, o=IBM, c=US
     member: cn=Person 2.2, cn=Dept 2, cn=Employees, o=IBM, c=US
     ibm-memberGroup: cn=Group 8, cn=Nested Static, cn=Groups, o=IBM, c=US
    

    The introduction of cycles into the nested group hierarchy is not allowed. If it is determined that a nested group operation results in a cyclical reference, either directly or through inheritance, it is considered a constraint violation and therefore, the update to the entry fails.

    Hybrid groups

    Any of the structural group object classes mentioned can be extended such that group membership is described by a combination of static, dynamic, and nested member types. For example:

    dn: cn=Group 10, cn=Groups, o=IBM, c=US
     objectclass: groupOfURLs
     objectclass: ibm-nestedGroup
     objectclass: ibm-staticGroup 
     objectclass: top
     cn: Group 10
     description: Group composed of static, dynamic, and nested members.
     memberURL: ldap:///cn=Austin, cn=Employees, o=IBM, c=US??one?objectClass=person
     ibm-memberGroup: cn=Group 9, cn=Nested Dynamic, cn=Groups, o=IBM, c=US
     member: cn=Person 10.1, cn=Dept 2, cn=Employees, o=IBM, c=US 
     member: cn=Person 10.2, cn=Dept 2, cn=Employees, o=IBM, c=US
    

    Determining group membership

    Two operational attributes can be used to query aggregate group membership. For a given group entry, the ibm-allMembers operational attribute enumerates the aggregate set of group membership, including static, dynamic, and nested members, as described by the nested group hierarchy. For a given user entry, the ibm-allGroups operational attribute enumerates the aggregate set of groups, including ancestor groups, to which that user has membership.

    A requester may only receive a subset of the total data requested, depending on how the ACLs have been set on the data. Anyone can request the ibm-allMembers and ibm-allGroups operational attributes, but the data set returned only contains data for the LDAP entries and attributes that the requester has access rights to. The user requesting the ibm-allMembers or ibm-allGroups attribute must have access to the member or uniquemember attribute values for the group and nested groups in order to see static members, and must be able to perform the searches specified in the memberURL attribute values in order to see dynamic members. For examples:

    Hierarchy examples


    Example of a nested group hierarchy

    For this example, m1 and m2 are in the member attribute of g2. The ACL for g2 allows user1 to read the member attribute, but user 2 does not have access to the member attribute. The entry LDIF for the g2 entry is as follows:

    dn: cn=g2,cn=groups,o=ibm,c=us
    objectclass: accessGroup
    cn: g2
    member: cn=m1,cn=users,o=ibm,c=us
    member: cn=m2,cn=users,o=ibm,c=us
    aclentry: access-id:cn=user1,cn=users,o=ibm,c=us:normal:rsc
    aclentry: access-id:cn=user2,cn=users,o=ibm,c=us:normal:rsc:at.member:deny:rsc
     
    

    The g4 entry uses the default aclentry, which allows both user1 and user2 to read its member attribute. The LDIF for the g4 entry is as follows:

    dn: cn=g4, cn=groups,o=ibm,c=us
    objectclass: accessGroup
    cn: g4
    member: cn=m5, cn=users,o=ibm,c=us
    

    The g5 entry is a dynamic group, which gets its two members from the memberURL attribute. The LDIF for the g5 entry is as follows:

    dn: cn=g5, cn=groups,o=ibm,c=us
    objectclass: container
    objectclass: ibm-dynamicGroup
    cn: g5
    memberURL: ldap:///cn=users,o=ibm,c=us??sub?(|(cn=m3)(cn=m4))
    

    The entries m3 and m4 are members of group g5 because they match the memberURL The ACL for the m3 entry allows both user1 and user2 to search for it. The ACL for the m4 entries doesn't allow user2 to search for it. The LDIF for m4 is as follows:

    dn: cn=m4, cn=users,o=ibm,c=us
    objectclass:person
    cn: m4
    sn: four
    aclentry: access-id:cn=user1,cn=users,o=ibm,c=us:normal:rsc
    aclentry: access-id:cn=user2,cn=users,o=ibm,c=us
    

    Example 1:
    User 1 does a search to get all the members of group g1. User 1 has access to all members, so they are all returned.
    ldapsearch -D cn=user1,cn=users,o=ibm,c=us -w user1pwd -s base -b cn=g1,
               cn=groups,o=ibm,c=us objectclass=* ibm-allmembers
     
     
    cn=g1,cn=groups,o=ibm,c=us
    ibm-allmembers: CN=M1,CN=USERS,O=IBM,C=US
    ibm-allmembers: CN=M2,CN=USERS,O=IBM,C=US
    ibm-allmembers: CN=M3,CN=USERS,O=IBM,C=US
    ibm-allmembers: CN=M4,CN=USERS,O=IBM,C=US
    ibm-allmembers: CN=M5,CN=USERS,O=IBM,C=US
    

    Example 2:
    User 2 does a search to get all the members of group g1. User 2 does not have access to members m1 or m2 because they do not have access to the member attribute for group g2. User 2 has access to the member attribute for g4 and therefore has access to member m5. User 2 can perform the search in the group g5 memberURL for entry m3, so that member are listed, but cannot perform the search for m4.
    ldapsearch -D cn=user2,cn=users,o=ibm,c=us -w user2pwd -s base -b cn=g1,
               cn=groups,o=ibm,c=us objectclass=* ibm-allmembers
     
     
    cn=g1,cn=groups,o=ibm,c=us
    ibm-allmembers: CN=M3,CN=USERS,O=IBM,C=US
    ibm-allmembers: CN=M5,CN=USERS,O=IBM,C=US
    

    Example 3:
    User 2 does a search to see if m3 is a member of group g1. User 2 has access to do this search, so the search shows that m3 is a member of group g1.
    ldapsearch -D cn=user2,cn=users,o=ibm,c=us -w user2pwd -s base -b cn=m3,
               cn=users,o=ibm,c=us objectclass=* ibm-allgroups
     
     
    cn=m3,cn=users,o=ibm,c=us
    ibm-allgroups: CN=G1,CN=GROUPS,O=IBM,C=US
    

    Example 4:
    User 2 does a search to see if m1 is a member of group g1. User 2 does not have access to the member attribute, so the search does not show that m1 is a member of group g1.
    ldapsearch -D cn=user2,cn=users,o=ibm,c=us -w user2pwd -s base -b 
               cn=m1,cn=users,o=ibm,c=us objectclass=* ibm-allgroups
     
     
    cn=m1,cn=users,o=ibm,c=us
     
    

    Group object classes

    ibm-dynamicGroup
    This auxiliary class allows the optional memberURL attribute. Use it with a structural class such as groupOfNames to create a hybrid group with both static and dynamic members.

    ibm-dynamicMember
    This auxiliary class allows the optional ibm-group attribute. Use it as a filter attribute for dynamic groups.

    ibm-nestedGroup
    This auxiliary class allows the optional ibm-memberGroup attribute. Use it with a structural class such as groupOfNames to enable sub-groups to be nested within the parent group.

    ibm-staticGroup
    This auxiliary class allows the optional member attribute. Use it with a structural class such as groupOfURLs to create a hybrid group with both static and dynamic members.
    Note:
    The ibm-staticGroup is the only class for which member is optional, all other classes taking member require at least 1 member.

    Group attribute types

    ibm-allGroups
    Shows all groups to which an entry belongs. An entry can be a member directly by the member, uniqueMember, or memberURL attributes, or indirectly by the ibm-memberGroup attribute. This Read-only operational attribute is not allowed in a search filter.

    ibm-allMembers
    Shows all members of a group. An entry can be a member directly by the member, uniqueMember, or memberURL attributes, or indirectly by the ibm-memberGroup attribute. This Read-only operational attribute is not allowed in a search filter.

    ibm-group
    Is an attribute taken by the auxiliary class ibm-dynamicMember. Use it to define arbitrary values to control membership of the entry in dynamic groups. For example, add the value "Bowling Team" to include the entry in any memberURL that has the filter "ibm-group=Bowling Team".

    ibm-memberGroup
    Is an attribute taken by the auxiliary class ibm-nestedGroup. It identifies sub-groups of a parent group entry. Members of all such sub-groups are considered members of the parent group when processing ACLs or the ibm-allMembers and ibm-allGroups operational attributes. The sub-group entries themselves are not members. Nested membership is recursive.

    Roles

    Role-based authorization is a conceptual complement to the group-based authorization, and is useful in some cases. As a member of a role, you have the authority to do what is needed for the role in order to accomplish a job. Unlike a group, a role comes with an implicit set of permissions. There is not a built-in assumption about what permissions are gained (or lost) by being a member of a group.

    Roles are similar to groups in that they are represented in the directory by an object. Additionally, roles contain a group of DNs. Roles which are to be used in access control must have an objectclass of 'AccessRole'. The 'Accessrole' objectclass is a subclass of the 'GroupOfNames' objectclass.

    For example, if there are a collection of DNs such as 'sys admin', your first reaction may be to think of them as the 'sys admin group' (since groups and users are the most familiar types of privilege attributes). However, since there are a set of permissions that you would expect to receive as a member of 'sys admin' the collection of DNs may be more accurately defined as the 'sys admin role'.


    Working with attributes

    Each directory entry has a set of attributes associated with it through it's object class. You can create, edit, or delete attributes to suit the needs of your organization.

    Note:
    After you have made a modification such as adding, if you have difficulty making additional modifications or if the modifications are not listed in the appropriate catagories, you need to refresh the schema by clicking the Refresh schema option in the left-hand navigation area.

    Adding an attribute

    Using the Directory Management Tool:

    If you have not done so already, expand the Schema category in the navigation area, then expand Attributes.

    1. Click Add attribute.
    2. Select a tab, either:
    3. Click OK to add the new attribute or click Cancel to return to View attributes without making any changes.

    Using the command line - required the HP-UX operating system:

    The following example adds an attribute type definition for an attribute called "myAttribute", with Directory String syntax and Case Ignore Equality matching. The IBM-specific part of the definition says that the attribute data is stored in a column named "myAttrColumn" in a table called "myAttrTable". If these names were not specified, both the column and table name would have defaulted to "myAttribute". The attribute is assigned to the "normal" access class, and values have a maximum length of 200 bytes.

    ldapmodify -D <admindn> -w <adminpw> -f myschema.ldif
     
    

    where the myschema.ldif file contains:

    dn: cn=schema
    changetype: add
    add: attributetypes
    attributetypes: ( myAttribute-oid NAME ( 'myAttribute' ) DESC 'An attribute 
                     I defined for my LDAP application' EQUALITY 2.5.13.2 
                     SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 USAGE userApplications )
    -
    add: ibmattributetypes
    ibmattributetypes: ( myAttribute-oid  DBNAME ( 'myAttrTable' 'myAttrColumn' ) 
                        ACCESS-CLASS normal LENGTH 200 )
    

    See LDAPMODIFY, LDAPADD for more information about this command.


    Editing an attribute

    Any part of a definition can be changed before you have added entries that use the attribute.

    Using the Directory Mangement Tool:

    If you have not done so already, expand the Schema category in the navigation area, then expand Attributes.

    1. Click Edit attribute.
    2. Select an attribute to edit using the Attribute drop-down list.
    3. Select a tab, either:
    4. Click OK to add the new attribute or click Cancel to return to View attributes without making any changes.

    See Adding an attribute help for additional information about attributes.

    Using the command line - required the HP-UX operating system:

    This example adds indexing to the attribute, so that searching on it is faster. Use the ldapmodify command and the LDIF file to change the definition:

    ldapmodify -D <admindn> -w <adminpw> -f myschemachange.ldif
     
    

    Where the myschemachange.ldif file contains:

    dn: cn=schema
    changetype: replace
    replace: attributetypes
    attributetypes: ( myAttribute-oid NAME ( 'myAttribute' ) DESC 'An attribute 
                     I defined for my LDAP application' EQUALITY 2.5.13.2 
                     SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 USAGE userApplications )
    -
    replace: ibmattributetypes
    ibmattributetypes: ( myAttribute-oid  DBNAME ( 'myAttrTable' 'myAttrColumn' ) 
                      ACCESS-CLASS normal LENGTH 200 EQUALITY SUBSTR )
    
    Note:
    Both portions of the definition (attributetypes and ibmattributetypes) must be included in the replace operation, even though only the ibmattributetypes section is changing. The only change is adding "EQUALITY SUBSTR" to the end of the definition to request indexes for equality and substring matching.
    See LDAPMODIFY, LDAPADD for more information about this command.

    Deleting an attribute

    To remove an attribute from the schema, you can delete the definition, if you have no data in the directory that includes this attribute.

    Using the Directory Management Tool:

    If you have not done so already, expand the Schema category in the navigation area, then expand Attributes.

    1. Click Delete attributes.
    2. Select an attribute to delete. Select multiple attributes using the Ctrl key.
    3. Click Delete to remove the selected attribute. You are prompted to confirm deletion of the attribute. If deleting multiple attributes, you can click Yes to all to confirm deletion of all selected attributes.

    Using the command line - required the HP-UX operating system:

    ldapmodify -D <admindn> -w <adminpw> -f myschemadelete.ldif
     
    

    Where the myschemadelete.ldif file includes:

    dn: cn=schema
    changetype: delete
    delete: attributetypes
    attributetypes: ( myAttribute-oid NAME ( 'myAttribute' ) DESC 'An attribute 
                     I defined for my LDAP application' EQUALITY 2.5.13.2 
                     SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 USAGE userApplications )
    -
    delete: ibmattributetypes
    ibmattributetypes: ( myAttribute-oid  DBNAME ( 'myAttrTable' 'myAttrColumn' ) 
                         ACCESS-CLASS normal LENGTH 200 EQUALITY SUBSTR )
     
    

    Binary attributes

    Binary attributes, such as images, are indicated by folder icon to the left of the attribute field.

    Because binary attributes cannot be displayed, if an attribute contains binary data, the field displays **** BINARY DATA ****. If the attribute contains multiple values, the field displays as a drop-down list. Click the icon to work with binary attributes.

    If the attribute has no data, a browse window is displayed. Select the file that contains the binary data and click Import.

    If the attribute already contains data, you are prompted to either Update the existing data or Export the existing data to a file.


    Working with object classes

    An object class is a set of attributes used to describe an object. For example, the object class tempEmployee could contain attributes associated with a temporary employee such as, idNumber, dateOfHire, or assignmentLength. You can add custom object classes to suit the needs of your organization.

    Note:
    After you have made a modification such as adding, if you have difficulty making additional modifications or if the modifications are not listed in the appropriate catagories, you need to refresh the schema by clicking the Refresh schema option in the left-hand navigation area.

    Adding an object class

    If you have not done so already, expand the Schema category in the navigation area, then expand Object classes.

    1. Click Add object class.
    2. Select a tab:
    3. Use the Optional attributes tab to select optional attributes and view inherited optional attributes.
      1. Select an attribute from the alphabetical list of Available attributes and click Add to make the attribute optional for the object class. Add multiple attributes using the Ctrl key.
      2. Inherited attributes are based on the Superior object class selected on the General tab. You can not change the inherited attributes without changing the Superior object class on the General tab.
    4. Click OK to add the new object class or click Cancel to return to View object classes without making any changes.

    Editing an object class

    If you have not done so already, expand the Schema category in the navigation area, then expand Object classes.

    1. Click Edit object class.
    2. Select an object class to edit using the Object class name drop-down list.
    3. Select a tab:
    4. Click OK to add the new object class or click Cancel to return to View object classes without making any changes.

    Deleting an object class

    If you have not done so already, expand the Schema category in the navigation area, then expand Attributes.

    1. Click Delete object classes.
    2. Select an object class to delete. Select multiple object classes using the Ctrl key.
    3. Click Delete to remove the selected object class. You are prompted to confirm deletion of the object class. If deleting multiple object classes, you can click Yes to all to confirm deletion of all selected object classes.

    Viewing the Directrory Management Tool log file

    View the log file to review error messages, directory and schema modifications, and server connection information for the current server. Servers are displayed as tabs in the navigation area. The current server is the selected tab in the navigation area.

    1. If you have not done so already, expand the Log file category in the navigation area.
    2. Click View log file. The log file for the current server is displayed in the work area. The log displays the most recent log entry at the bottom of the panel.
    3. To clear the log file, Click Clear log file in the navigation area. Clearing the log file removes all log entries for the current server, leaving only a log message stating that the log was cleared.

    Working with directory entries

    You can perform the following operations with directory entries:


    Searching the directory tree for entries

    There are two options for searching the directory tree:

    Both search options are accessible by expanding the Directory tree category in the navigation area, then expanding Search tree.

    Simple search

    A simple search uses a default search criteria:

    To perform a simple search:

    1. If you have not done so already, expand the Directory tree category, then expand Search tree.
    2. Click Simple search.
    3. Select an entry type from the commonly used object classes or select Other if the entry type is not listed. If you select Other, select an object class from the drop-down list.
    4. Select to either Show all directory entries of the selected entry type or select to Search on a specific attribute for the selected entry type. If you select to search on a specific attribute, select an attribute from the drop-down list and enter the attribute value in the Search for box.
    5. Click OK to begin the search based on the criteria specified or click Cancel to return to Browse tree without performing the search.

    Advanced search

    An advanced search enables you to specify search constraints and enable search filters. Use the Simple search to use default search criteria.

    After performing a search, click Save search to save the search criteria. Saved searches are displayed under the Search tree category in the navigation area. Clicking a saved search in the navigation area start the search and display the search results.

    Editing a saved search

    To edit a saved search:

    1. Under the Search tree category in the navigation area, click Edit search in the navigation area.
    2. Select a saved search to edit, then click OK.
    3. Edit the search criteria and click OK to start the search and verify the expected results.
    4. Click Save search.
    5. You are prompted to specify the search name. The default is the previously saved name, however, you can modify the search name.

    Deleting a saved search

    To delete a saved search:

    1. Under the Search tree category in the navigation area, click Delete search in the navigation area.
    2. Select a saved search to delete, then click Delete.
    3. You are prompted to confirm the deletion of each selected saved search. Click Yes to all to confirm deletion of all selected searches and bypass the confirmation for each selected search.

    Adding an LDAP entry

    If you have not done so already, expand the Directory tree category in the navigation area.

    1. Click Add on the toolbar.
    2. Select an Entry type, or select Other to select an entry type that is not listed. If you select Other as the Entry type :

      The Current definition tab shows the object classes, required attributes, and optional attributes based on the selections on the Object class tab.

    3. In the Parent DN field, enter the distinguished name of the tree entry you selected, for example, ou=Austin, o=IBM. The Parent DN defaults to the entry selected in the tree.
    4. In the Entry RDN field, enter the relative distinguished name (RDN) of the entry that you are adding, for example, cn=John Doe.
    5. Click OK to continue or click Cancel to return to Browse tree without making any changes to the directory.
    6. Enter the DN for the new entry. The default DN is the Parent DN plus the Entry RDN from the Add an LDAP Entry panel.

      Depending on the Entry type you selected a series of tabs is displayed on this panel. Most entry types display an Attributes tab. The User entry displays three tabs: Business, Personal, and User. The Group entry displays two tabs: Group and Other.

      You can move the mouse over the field name or field to display the attribute syntax, for example, IA5 String - case-sensitive string.

    7. Click the ACL button to modify the access control list for this entry. See Working with Access Control Lists for information on ACLs.
    8. After completing at least the required fields, click Add to add the new entry or click Cancel to return to Browse tree without making changes to the directory.

    Adding an auxiliary object class

    Use the Add auxiliary class button on the toolbar to add an auxiliary object class to an existing entry in the directory tree. An auxiliary object class provides additional attributes to the entry to which it is added.

    If you have not done so already, expand the Directory tree category in the navigation area.

    1. Click Browse tree.
    2. Select an entry and click Add auxiliary class on the toolbar.
    3. Select an Auxiliary class. Select multiple auxiliary classes using the Ctrl key.
    4. Click OK to add the auxiliary class to the entry and edit the entry, or click Cancel to return to Browse tree without making any changes.

    Editing an LDAP entry

    If you have not done so already, expand the Directory tree category in the navigation area.

    1. Select a directory entry and click Edit on the toolbar.

      The Edit entry panel contains tabs for the attributes associated with the object class. The Summary tab displays the completed attributes for that entry. Users and Groups have tabs specific to the User and Group entry types as follows:

      The Users entry contains five tabs:

      The Groups entry contains tabs unique to the Group entry. See Groups for additional information.

      You can move the mouse over the field name or field to display the attribute syntax, for example, IA5 String - case-sensitive string.

    2. Click the ACL button to modify the access control list for this entry. See Working with Access Control Lists for information on ACLs.
    3. Edit the attributes, then click OK to save your changes or click Cancel to return to Browse tree without making changes.

    Changing group membership

    If you have not done so already, expand the Directory tree category in the navigation area.

    1. Click Browse tree.
    2. Select a user from the directory tree and click the Edit icon on the toolbar. User entries have an user icon icon to the left of their entry in the directory tree.
    3. Click the Memberships tab.
    4. Click Change to modify the memberships for the user. The Change memberships panel displays the Available groups to which the user can be added, as well as the entries Member of groups.
    5. Click OK to save your changes or click Cancel to return to the previous panel without saving your changes.

    Troubleshooting


    Debugging

    Debug output for configuration

    During configuration, you might experience some problems with the IBM Directory configuration programs. There are some extra debugging steps that can help you and IBM support teams determine the cause of these problems.

    There are three configuration programs in the IBM Directory product. Two are run from a command line, and one is GUI-based. The configuration programs are:

    These configuration programs support three main functions:

    The configuration of the first two options, Admin DN and the Web server configuration file, are very straightforward. Generally, the only reasons the configuration of the Admin DN fails are if the IBM Directory configuration file ( <install dir>/etc/slapd32.conf ) has had the permissions accidentally changed, or if the user enters an invalid DN. Likewise, the configuration of the Web server usually has no problems as long as the program or the user can locate the correct Web server configuration file. (The program attempts to locate the file and enters the filename into the entryfield, but the user has the option of changing it if it is not correct.)

    Database Configuration

    This leaves the most problematic option, the database configuration/unconfiguration. Because there are so many variables at play during configuration, errors can occur. Some of the factors that can affect this option are:

    If the database configuration fails, the bottom-line question for the user is, "What failed, and how do I fix it?". The following sections describe sources of output that can be used to debug configuration problems.

    Standard Sources of Output

    There are several "standard" sources of information available to the user:

    Creating Advanced Debug Output

    There are two more sources of output that can be used to debug configuration problems. Both of them are initiated by setting environment variables before running the configuration. For both of these debug options, it is strongly recommended that your console window be set to scrollable so that any messages that scroll off the screen can be seen later.

    JAVA_DEBUG
    Set this environment variable to any non-empty value Example:
    JAVA_DEBUG=1
    

    On UNIX platforms, use export JAVA_DEBUG=1. This causes certain Java debug information built into the code to be displayed on stdout (the console).

    LDAP_DBG
    Set this environment variable to any non-empty value. Example:
    LDAP_DBG =1
    

    On UNIX platforms, use export LDAP_DBG=1. This causes a debug file to be created for the IBM support and development teams. The file name that is created is dbg.log.

    On the Windows NT and Windows 2000 platforms, dbg.log is created in the root directory ( \ ) of the drive from which you run the configuration program. On UNIX platforms, dbg.log is created in the /tmp directory.

    Note:
    This debug log file contains code-specific information intended for the IBM development team and is not intended for use by the customer. Send this file along with any other debug information to the IBM support team.

    slapd command parameters

    The slapd command has two parameters on UNIX systems and an additional two parameters on Windows systems.

    -h <debug_mask>
    Causes slapd to generate debug output to stdout. The debug_mask is a bit mask that controls which output is generated with values up to 65535. This parameterded for use by IBM service personel.

    -f <path_to_configuration_file>
    Specifies the location of the configuration file used when starting the server. This parameter is used if you want to use a customized configuration file. If not specified, slapd defaults to the platform dependent location where the configuration file was installed.

    Additional parameters for Windows systems:

    -i <servicename>
    Installs IBM Directory as service on the server.

    -u <servicename>
    Removes IBM Directory as service from the server.

    Server Debug Mode

    If the error logs do not provide enough information to resolve a problem, you can run the IBM Directory server in a special debug mode that generates very detailed information. The server executable slapd must be run from a command prompt to enable debug output. The syntax is as follows:

    ldtrc on
    slapd -h bitmask
     
    
    where the specified bitmask value determines which categories of debug output are generated.

    Table 6. Debug categories

    Hex Decimal Value Description
    0x0001 1 LDAP_DEBUG_TRACE Entry and exit from routines
    0x0002 2 LDAP_DEBUG_PACKETS Packet activity
    0x0004 4 LDAP_DEBUG_ARGS Data arguments from requests
    0x0008 8 LDAP_DEBUG_CONNS Connection activity
    0x0010 16 LDAP_DEBUG_BER Encoding and decoding of data
    0x0020 32 LDAP_DEBUG_FILTER Search filters
    0x0040 64 LDAP_DEBUG_MESSAGE Messaging subsystem activities and events
    0x0080 128 LDAP_DEBUG_ACL Access Control List activities
    0x0100 256 LDAP_DEBUG_STATS Operational statistics
    0x0200 512 LDAP_DEBUG_THREAD Threading statistics
    0x0400 1024 LDAP_DEBUG_REPL Replication statistics
    0x0800 2048 LDAP_DEBUG_PARSE Parsing activities
    0x1000 4096 LDAP_DEBUG_PERFORMANCE Relational backend performance statistics
    0x1000 8192 LDAP_DEBUG_RDBM Relational backend activities (RDBM)
    0x4000 16384 LDAP_DEBUG_REFERRAL Referral activities
    0x8000 32768 LDAP_DEBUG_ERROR Error conditions
    0xffff 65535 ALL
    0x7fffffff 2147483647 LDAP_DEBUG_ANY All levels of debug

    For example, specifying a bitmask value of "65535" turns on full debug output and generates the most complete information.

    When you are finished, issue the following command at a command prompt:

    ldtrc off
    

    It is recommended that you contact IBM Service for assistance with interpreting of the debug output and resolving of the problem.


    Appendixes


    Appendix A. Indexing rules

    Index rules attached to attributes make it possible to retrieve information faster. If only the attribute is given, all possible indexes are maintained. IBM Directory provides the following indexing rules:


    Indexing Rules Specifications for Attributes:

    Specifying an indexing rule for an attribute controls the creation and maintenance of special indexes on the attribute values. This greatly improves the response time to searches with filters which include those attributes. The three possible types of indexing rules are related to the operations applied in the search filter.

    Equal
    Applies to the following search operations:

    For example:

    "cn = John Doe"
    "sn >= Doe"
    

    Approximate
    Applies to the following search operation:

    For example:

    "sn ~= doe"
    

    Substring
    Applies to the search operation using the substring syntax:

    For example:

    "sn = McC*"
    "sn = *baugh"
    "cn = J*Doe"
    

    At a minimum, it is recommended that you specify Equal indexing on any attributes that are to be used in search filters.


    Appendix B. Using gsk5ikm

    The following key-management program is provided with IBM's Global Security Kit (GSKit):

    Note:
    On the AIX operating systems, if you are prompted to set JAVA_HOME, you can set it to either the system-installed Java or the Java version included with the IBM Directory Server. If you use the IBM Directory Server version, you also need to set the LIBPATH environment variable as follows:
      export LIBPATH=/usr/ldap/java/bin:/usr/ldap/java/bin/classic:$LIBPATH
     
    

    Use gsk5ikm to create public-private key pairs and certificate requests, receive certificate requests into a key database file, and manage keys in a key database file.

    The tasks you can perform with gsk5ikm include:


    Creating a key pair and requesting a certificate from a Certificate Authority

    If your client application is connecting to an LDAP server that requires client and server authentication, then you need to create a public-private key pair and a certificate.

    If your client application is connecting to an LDAP server that only requires server authentication, it is not necessary to create a public-private key pair and a certificate. It is sufficient to have a certificate in your client key database file that is marked as a trusted root. If the Certification Authority (CA) that issued the server's certificate is not already defined in your client key database, you need to request the CA's certificate from the CA, receive it into your key database, and mark it as trusted. See Designating a key as a trusted root.

    Your client uses its private key to sign messages sent to servers. The server sends its public key to clients so that they can encrypt messages to the server, which the server decrypts with its private key.

    To send its public key to a server, the client needs a certificate. The certificate contains the client's public key, the Distinguished Name associated with the client's certificate, the serial number of the certificate, and the expiration date of the certificate. A certificate is issued by a CA, which verifies the identity of the client.

    The basic steps to create a certificate that is signed by a CA are:

    1. Create a certificate request using gsk5ikm.
    2. Submit the certificate request to the CA. This can be done using E-mail or an on-line submission from the CA's Web page.
    3. Receive the response from the CA to an accessible location on the file system of your server.
    4. Receive the certificate into your key database file.
    Note:
    If you are obtaining a signed client certificate from a CA that is not in the default list of trusted CAs, you need to obtain the CA's certificate, receive it into your key database and mark it as trusted. This must be done before receiving your signed client certificate into the key database file.

    To create a public-private key pair and request a certificate:

    1. Start gsk5ikm Java utility by typing:
      gsk5ikm
      
    2. Select Key Database File.
    3. Select New (or Open if the key database already exists).
    4. Specify key database file name and location. Type OK.
      Note:
      A key database is a file that the client or server uses to store one or more key pairs and certificates.
    5. When prompted, supply password for the key database file. Click OK.
    6. Select Create.
    7. Select New Certificate Request.
    8. Supply user-assigned label for key pair. The label identifies the key pair and certificate in the key database file.
    9. If you are requesting a low-assurance client certificate, enter the common name. This must be unique and the full name of the user.
    10. If you are requesting a high-assurance secure server certificate, then:
    11. Click OK.
    12. A message identifying the name and location of the certificate request file is displayed. Click OK.
    13. Send the certificate request to the CA.

      If this is a request for a VeriSign low assurance certificate or secure server certificate, you must E-mail the certificate request to VeriSign.

      You can mail the low assurance certificate request to VeriSign immediately. A secure server certificate request requires more documentation. To find out what VeriSign requires for a secure server certificate request, go to the following URL: http://www.verisign.com/ibm.

    14. When you receive the certificate from the CA, use gsk5ikm to receive it into the key database where you stored the key pair. See Receiving a certificate into a key database.
    Note:
    Change the key database password frequently. If you specify an expiration date, you need to keep track of when you need to change the password. If the password expires before you change it, the key database is not usable until the password is changed.

    Receiving a certificate into a key database

    After receiving a response from your CA, you need to receive the certificate into a key database.

    To receive a certificate into a key database:

    1. Type gsk5ikm to start the Java utility.
    2. Select Key Database File.
    3. Select Open.
    4. Specify key database file name and location. Type OK.
    5. When prompted, supply password for the key database file, click OK.
    6. Select Create.
    7. Select Personal Certificates in the middle display window.
    8. Click Receive.
    9. Enter name and location of the certificate file that contains the signed certificate, as received from the CA. Click OK.

    Changing a key database password

    To change a key database password:

    1. Type gsk5ikm to start the Java utility.
    2. Select Key Database File.
    3. Select Open.
    4. Specify key database file name and location. Type OK.
    5. When prompted, supply password for the key database file. Click OK.
    6. Select Key Database File.
    7. Select Change Password.
    8. Enter <New Password>.
    9. Confirm <New Password>.
    10. Select and set optional password expiration time.
    11. Select Stash the password to a file? if you want the password to be encrypted and stored on disk.
    12. Click OK.
    13. A message is displayed with the file name and location of the stash password file. Click OK.
    Note:
    The password is important because it protects the private key. The private key is the only key that can sign documents or decrypt messages encrypted with the public key.

    Showing Information about a Key

    To show information about a key, such as its name, size or whether it is a trusted root:

    1. Type gsk5ikm to start the Java utility.
    2. Select Key Database File.
    3. Select Open.
    4. Specify key database file name and location. Type OK.
    5. When prompted, supply password for the key database file. Click OK.
    6. To see information about keys designated as Personal Certificates:
    7. To see information about keys that are designated as Signer Certificates:

    Deleting a Key

    To delete a key:

    1. Type gsk5ikm to start the Java utility.
    2. Select Key Database File.
    3. Select Open.
    4. Specify key database file name and location. Type OK.
    5. When prompted, supply password for the key database file. Click OK.
    6. Select the type of key you want to delete at the top of the Key database content window (Personal Certificates, Signer Certificates, or Personal Certificate Requests).
    7. Select a certificate.
    8. Click Delete.
    9. Click Yes to confirm.

    Making a key the default key in the key ring

    The default key must be the private key the server uses for its secure communications.

    To make a key the default key in the key ring:

    1. Type gsk5ikm to start the Java utility.
    2. Select Key Database File.
    3. Select Open.
    4. Specify key database file name and location. Type OK.
    5. When prompted, supply password for the key database file. Click OK.
    6. Select Personal Certificates at the top of the Key database content window.
    7. Select the desired certificate.
    8. Click View/Edit.
    9. Select the Set the certificates as the default box. Click OK.

    Creating a key pair and certificate request for self-signing

    By definition, a secure server must have a public-private key pair and a certificate.

    The server uses its private key to sign messages to clients. The server sends its public key to clients so they can encrypt messages to the server, which the server decrypts with its private key.

    The server needs a certificate to send its public key to clients. The certificate contains the server's public key, the Distinguished Name associated with the server's certificate, the serial number of the certificate, and the expiration date of the certificate. A certificate is issued by a CA, who verifies the identity of the server.

    You can request one of the following certificates:

    For information about using a CA such as VeriSign to sign the server certificate, see Creating a key pair and requesting a certificate from a Certificate Authority.

    The basic steps to creating a self-signed certificate are:

    1. Type gsk5ikm to start the Java utility.
    2. Select Key Database File.
    3. Select New, or Open if the key database already exists.
    4. Specify key database file name and location. Type OK.
      Note:
      A key database is a file that the client or server uses to store one or more key pairs and certificates.
    5. When prompted, supply password for the key database file. Click OK.
    6. Click New Self-signed.
    7. Supply the following:
    8. Click OK.

    .


    Exporting a key

    If you need to transfer a key pair or certificate to another computer, you can export the key pair from its key database to a file. On the other computer, you can import the key pair into a key ring.

    To export a key from a key database:

    1. Type gsk5ikm to start the Java utility.
    2. Select Key Database File.
    3. Select Open.
    4. Specify key database file name and location. Type OK.
    5. When prompted, supply password for the key database file. Click OK.
    6. Select Personal Certificates at the top of the Key database content window.
    7. Select the desired certificate.
    8. Click Export/Import.
    9. For Action Type, select Export Key.
    10. Select the Key file type:
    11. Specify a file name.
    12. Specify location.
    13. Click OK.
    14. Enter the required password for the file. Click OK.

    Importing a key

    To import a key into a key ring:

    1. Type gsk5ikm to start the Java utility.
    2. Select Key Database File.
    3. Select Open.
    4. Specify key database file name and location. Type OK.
    5. When prompted, supply password for the key database file. Click OK.
    6. Select Personal Certificates at the top of the Key database content window.
    7. Select the desired certificate.
    8. Click Export/Import.
    9. For Action Type, select Import Key.
    10. Select the desired Key file type.
    11. Enter the file name and location.
    12. Click OK.
    13. Enter the required password for the source file. Click OK.

    Designating a key as a trusted root

    A trusted root key is the public key and associated Distinguished Name of a CA. The following trusted roots are automatically defined in each new key database:

    Note:
    Each of these trusted roots are initially set to be trusted roots by default.

    To designate a key as a trusted root:

    1. Type gsk5ikm to start the Java utility.
    2. Select Key Database File.
    3. Select Open.
    4. Specify key database file name and location. Type OK.
    5. When prompted, supply password for the key database file. Click OK.
    6. Select Signer Certificates at the top of the Key database content window.
    7. Select the desired certificate.
    8. Click View/Edit.
    9. Check the Set the certificate as a trusted root box, and click OK.
    10. Select Key Database File and then select Close.

    Removing a key as a trusted root

    A trusted root key is the public key and associated Distinguished Name of a CA. The following trusted roots are automatically defined in each new key database:

    Note:
    Each of these trusted roots are initially set to be trusted roots by default.

    To remove the trusted root status of a key:

    1. Type gsk5ikm to start the Java utility.
    2. Select Key Database File.
    3. Select Open.
    4. Specify key database file name and location. Type OK.
    5. When prompted, supply password for the key database file. Click OK.
    6. Select Signer Certificates at the top of the Key database content window.
    7. Select the desired certificate.
    8. Click View/Edit.
    9. Uncheck the Set the certificate as a trusted root box. Click OK.
    10. Select Key Database File and then select Close.

    Requesting a certificate for an existing key

    To create a certificate request for an existing key:

    1. Type gsk5ikm to start the Java utility.
    2. Select Key Database File.
    3. Select Open.
    4. Specify key database file name and location. Type OK.
    5. When prompted, supply password for the key database file. Click OK.
    6. Select Personal Certificates at the top of the Key database content window.
    7. Select the desired certificate.
    8. Click Export/Import.
    9. For Action Type, select Export Key.
    10. Select the desired Data Type:
    11. Enter the certificate file name and location.
    12. Click OK.
    13. Select Key Database File and then select Close.

    Send the certificate request to the CA.

    If this is a request for a VeriSign low assurance certificate or secure server certificate, you must E-mail the certificate request to VeriSign.

    You can mail the low assurance certificate request to VeriSign immediately. A secure server certificate request requires more documentation. To find out what VeriSign requires for a secure server certificate request, go to the following URL: http://www.verisign.com/ibm.


    Migrating a keyring file to the key database format

    The gsk5ikm program can be used to migrate an existing keyring file, as created with mkkf, to the format used by gsk5ikm.

    To migrate a keyring file:

    1. Type gsk5ikm to start the Java utility.
    2. Select Key Database File.
    3. Select Open.
    4. Specify key database file name and location. Type OK.
    5. When prompted, supply password for the keyring file. Click OK.
    6. Select Key Database File.
    7. Select Save As....
    8. Select CMS key database file as the Key database type.
    9. Specify a file name.
    10. Specify location.
    11. Click OK.

    Appendix C. LDAP data interchange format (LDIF)

    This documentation describes the LDAP Data Interchange Format (LDIF), as used by the ldapmodify, ldapsearch and ldapadd utilities. The LDIF specified here is also supported by the server utilities provided with the IBM Directory.

    LDIF is used to represent LDAP entries in text form. The basic form of an LDIF entry is:

    dn: <distinguished name>
    <attrtype> : <attrvalue>
    <attrtype> : <attrvalue>
    ...
    

    A line can be continued by starting the next line with a single space or tab character, for example:

          dn: cn=John E Doe, o=University of Higher
           Learning, c=US
    

    Multiple attribute values are specified on separate lines, for example:

          cn: John E Doe
          cn: John Doe
    

    If an <attrvalue> contains a non-US-ASCII character, or begins with a space or a colon ':', the <attrtype> is followed by a double colon and the value is encoded in base-64 notation. For example, the value " begins with a space" would be encoded like this:

          cn:: IGJlZ2lucyB3aXRoIGEgc3BhY2U=
    

    Multiple entries within the same LDIF file are separated by a blank line. Multiple blank lines are considered a logical end-of-file.


    LDIF example

    Here is an example of an LDIF file containing three entries.

          dn: cn=John E Doe, o=University of High
           er Learning, c=US
          cn: John E Doe
          cn: John Doe
          objectclass: person
          sn: Doe
      
          dn: cn=Bjorn L Doe, o=University of High
           er Learning, c=US
          cn: Bjorn L Doe
          cn: Bjorn Doe
          objectclass: person
          sn: Doe
      
          dn: cn=Jennifer K. Doe, o=University of High
           er Learning, c=US
          cn: Jennifer K. Doe
          cn: Jennifer Doe
          objectclass: person
          sn: Doe
          jpegPhoto:: /9j/4AAQSkZJRgABAAAAAQABAAD/2wBDABALD
           A4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQ
           ERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVG
          ...
    

    The jpegPhoto in Jennifer Jensen's entry is encoded using base-64. The textual attribute values can also be specified in base-64 format. However, if this is the case, the base-64 encoding must be in the code page of the wire format for the protocol (that is, for LDAP V2, the IA5 character set and for LDAP V3, the UTF-8 encoding).


    Version 1 LDIF support

    The client utilities (ldapmodify and ldapadd) have been enhanced to recognize the latest version of LDIF, which is identified by the presence of the "version: 1" tag at the head of the file. Unlike the original version of LDIF, the newer version of LDIF supports attribute values represented in UTF-8 (instead of the very limited US-ASCII).

    However, manual creation of an LDIF file containing UTF-8 values may be difficult. In order to simplify this process, a charset extension to the LDIF format is supported. This extension allows an IANA character set name to be specified in the header of the LDIF file (along with the version number). A limited set of the IANA character sets are supported. See IANA Character Sets Supported by Platform for the specific charset values that are supported for each operating system platform.

    The version 1 LDIF format also supports file URLs. This provides a more flexible way to define a file specification. File URLs take the following form:

          attribute:< file:///path          (where path syntax depends on platform)
    

    For example, the following are valid file Web addresses:

          jpegphoto:< file:///d:\temp\photos\myphoto.jpg    (DOS/Windows style paths)
          jpegphoto:< file:///etc/temp/photos/myphoto.jpg   (Unix style paths)
    
    Note:
    The IBM Directory utilities support both the new file URL specification as well as the older style (e.g. "jpegphoto: /etc/temp/myphoto"), regardless of the version specification. In other words, the new file URL format can be used without adding the version tag to your LDIF files.

    Version 1 LDIF examples

    You can use the optional charset tag so that the utilities will automatically convert from the specified character set to UTF-8 as in the following example:

     version: 1
     charset: ISO-8859-1
     
     dn: cn=Juan Griego, o=University of New Mexico, c=US
     cn: Juan Griego
     sn: Griego
     description:: V2hhdCBhIGNhcmVmdWwgcmVhZGVyIHlvd
     title: Associate Dean
     title: [title in Spanish]
     jpegPhoto:> file:///usr/local/photos/jgriego.jpg
    

    In this instance, all values following an attribute name and a single colon are translated from the ISO-8859-1 character set to UTF-8. Values following an attribute name and a double colon (such as description:: V2hhdCBhIGNhcm... ) must be base-64 encoded, and are expected to be either binary or UTF-8 character strings. Values read from a file, such as the jpegPhoto attribute specified by the Web address in the previous example, are also expected to be either binary or UTF-8. No translation from the specified "charset" to UTF-8 is done on those values.

    In this example of an LDIF file without the charset tag, content is expected to be in UTF-8, or base-64 encoded UTF-8, or base-64 encoded binary data:

    # IBM Directorysample LDIF file
     #
     # The suffix "o=IBM, c=US" should be defined before attempting to load
     # this data.
     
     version: 1
     
     dn: o=IBM, c=US
     objectclass: top
     objectclass: organization
     o: IBM
     
     dn: ou=Austin, o=IBM, c=US
     ou: Austin
     objectclass: organizationalUnit
     seealso: cn=Linda Carlesberg, ou=Austin, o=IBM, c=US
    

    This same file could be used without the version: 1 header information, as in previous releases of the IBM Directory:

     # IBM Directorysample LDIF file
     #
     # The suffix "o=IBM, c=US" should be defined before attempting to load
     # this data.
     
     dn: o=IBM, c=US
     objectclass: top
     objectclass: organization
     o: IBM
     
     dn: ou=Austin, o=IBM, c=US
     ou: Austin
     objectclass: organizationalUnit
     seealso: cn=Linda Carlesberg, ou=Austin, o=IBM, c=US
    
    Note:
    The textual attribute values can be specified in base-64 format.

    IANA Character Sets Supported by Platform

    The following table defines the set of IANA-defined character sets that can be defined for the charset tag in a Version 1 LDIF file, on a per-platform basis. The value in the left-most column defines the text string that can be assigned to the charset tag. An "X" indicates that conversion from the specified charset to UTF-8 is supported for the associated platform, and that all string content in the LDIF file is assumed to be represented in the specified charset. "n/a" indicates that the conversion is not supported for the associated platform.

    String content is defined to be all attribute values that follow an attribute name and a single colon.

    See IANA Character Sets for more information about IANA-registered character sets.

    Table 7.

    Character Conversion Supported
    Set Name NT AIX Solaris Linux, Linux_390, HP-UX
    ISO-8859-1 X X X X
    ISO-8859-2 X X X X
    ISO-8859-5 X X X X
    ISO-8859-6 X X X X
    ISO-8859-7 X X X X
    ISO-8859-8 X X X X
    ISO-8859-9 X X X X
    ISO-8859-15 NA X X NA
    IBM437 X NA NA NA
    IBM850 X X NA NA
    IBM852 X NA NA NA
    IBM857 X NA NA NA
    IBM862 X NA NA NA
    IBM864 X NA NA NA
    IBM866 X NA NA NA
    IBM869 X X NA NA
    IBM1250 X NA NA NA
    IBM1251 X NA NA NA
    IBM1253 X NA NA NA
    IBM1254 X NA NA NA
    IBM1255 X NA NA NA
    IBM1256 X NA NA NA
    TIS-620 X X NA NA
    EUC-JP NA X X X
    EUC-KR NA X X NA
    EUC-CN NA X X NA
    EUC-TW NA X X NA
    Shift-JIS X X X X
    KSC X X NA NA
    GBK X X X NA
    Big5 X X X NA

    Appendix D. Notices

    This information was developed for products and services offered in the U.S.A. IBM might not offer the products, services, or features discussed in this document in other countries. Consult your local IBM representative for information on the products and services currently available in your area. Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM product, program, or service may be used. Any functionally equivalent product, program, or service that does not infringe any IBM intellectual property right may be used instead. However, it is the user's responsibility to evaluate and verify the operation of any non-IBM product, program, or service.

    IBM may have patents or pending patent applications covering subject matter in this document. The furnishing of this document does not give you any license to these patents. You can send license inquiries, in writing, to:

    IBM Director of Licensing
    IBM Corporation
    North Castle Drive
    Armonk, NY 10504-1785
    U.S.A.

    For license inquiries regarding double-byte (DBCS) information, contact the IBM Intellectual Property Department in your country or send inquiries, in writing, to:

    IBM World Trade Asia Corporation Licensing
    2-31 Roppongi 3-chome, Minato-ku
    Tokyo 106, Japan

    The following paragraph does not apply to the United Kingdom or any other country where such provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in certain transactions, therefore, this statement may not apply to you.

    This information could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the information. IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this information at any time without notice.

    Any references in this information to non-IBM Web sites are provided for convenience only and do not in any manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of the materials for this IBM product and use of those Web sites is at your own risk.

    IBM may use or distribute any of the information you supply in any way it believes appropriate without incurring any obligation to you.

    Licensees of this program who wish to have information about it for the purpose of enabling: (i) the exchange of information between independently created programs and other programs (including this one) and (ii) the mutual use of the information which has been exchanged, should contact:

    IBM Corporation
    Department LZKS
    11400 Burnet Road
    Austin, TX 78758
    U.S.A.

    Such information may be available, subject to appropriate terms and conditions, including in some cases, payment of a fee.

    The licensed program described in this document and all licensed material available for it are provided by IBM under terms of the IBM Customer Agreement, IBM International Program License Agreement, or any equivalent agreement between us.

    Any performance data contained herein was determined in a controlled environment. Therefore, the results obtained in other operating environments may vary significantly. Some measurements may have been made on development-level systems and there is no guarantee that these measurements will be the same on generally available systems. Furthermore, some measurement may have been estimated through extrapolation. Actual results may vary. Users of this document should verify the applicable data for their specific environment.

    Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM has not tested those products and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products.

    All statements regarding IBM's future direction or intent are subject to change or withdrawal without notice, and represent goals and objectives only.

    All IBM prices shown are IBM's suggested retail prices, are current and are subject to change without notice. Dealer prices may vary.


    Trademarks

    The following terms are trademarks of International Business Machines Corporation in the United States, or other countries, or both:

    AIX DB2 IBM OS/400 SecureWay World Registry z/OS

    Microsoft(R), MS-DOS, Windows, and Windows NT are registered trademarks of Microsoft Corporation

    UNIX is a registered trademark of The Open Group.

    Other company, product, and service names may be trademarks or service marks of others.


    Glossary

    Use this section to locate definitions of some of the IBM Directory product terms

    access control lists (ACLs)
    Access Control Lists (ACLs) provide a means to protect information stored in an LDAP directory. Administrators use ACLs to restrict access to different portions of the directory, or specific directory entries. LDAP directory entries are related to each other by a hierarchical tree structure. Each directory entry (or object) contains the distinguished name of the object as well as a set of attributes and their corresponding values.

    access control groups
    Groups to be used for access control. Each group contains a multivalued attribute consisting of member DNs. Access control groups have an object class of 'AccessGroup'.

    access permissions
    There are two sets of access permissions:

    aclEntry
    aclEntry is a multivalue attribute that contains information pertaining to the access allowed to the entry object and each of its attributes. An aclEntry lists the following types of information:

    aclPropagate
    ACLs can be set on any object in the tree. As is typical in a hierarchical file system, LDAP access control lists can propagate down through the directory hierarchy. These ACLs, called propagating ACLs, have the aclPropagate attribute = true. All children of this object now inherits the ACL set at that point. In order to specify an ACL different from that of its parent, this new ACL must be explicitly set.

    aclSource
    Each object has an associated aclSource attribute. This contains the DN of the entry in which the ACL is defined. This attribute is kept by the server, but might be retrieved for administrative purposes.

    aliases
    Aliases can be used within LDAP to reference entries anywhere within the directory tree. An alias is simply a pointer to another directory object.

    Aliases Objects are of 'objectclass=aliasObject'. The mandatory attribute in this class, 'aliasedObjectName', contains the full dn of another directory object (the one to which the alias refers).

    By default, aliases objects are not dereferenced during a search operation. The client may request dereferencing using a flag on the command line. Aliases may be dereferenced when locating the base entry of the search. If the object specified as the base is an alias object, the object will be derefenced before beginning the search.

    For example, an object with dn "cn=personOfTheWeek, o=Corporation, c=US" which has the attribute aliasedObjectName: "cn=personA, o=Corporation,c=US". With 'deref finding' set, a search base of "cn=personOfTheWeek, o=Corporation, c=US" is dereferenced to "cn=personA, o=Corporation,c=US". This now becomes the base for the search.

    Another possibility is to dereference aliases during searching. In this case, the dn used as the base is the one given by the client, but alias entries found during the search are dereferenced.

    An example of this might be a search for "cn=*week*" with a base of o=Corporation, c=US". While the located Node is "cn=personOfTheWeek, o=Corporation, c=US" this object would be dereferenced and the entry "cn=personA, o=Corporation,c=US" is returned as the search result.

    A dereference of 'all' might also be used. This means that alias entries are dereferenced both when locating the search base and when objects are found during the search operation.

    attribute access classes
    Attributes requiring similar permission for access are grouped together in classes. Attributes are assigned to an access class within the slapd.at.* schema files. The three user-modifiable access classes are :

    bulkload
    A command line utility that is used for bulk-loading large amounts of data in ldif format.

    directory schema
    Entries in a directory are made up of a collection of attributes and their associated values. Attributes mighty have one or more values. In order to identify a particular value in an entry, the attribute type name is specified along with the value, as in "cn=John Doe". This is referred to as an attribute:value pair. Every entry contains an objectClass attribute that identifies what type of information the entry contains. In fact, the object class dictates which other attributes may be present in an entry. The directory schema defines the valid attribute types and object classes that may appear in the directory. Attribute type definitions define the maximum length and syntax of its values. Object class definitions specify which attributes MUST be present in an object of that class, as well as attributes that might be present.

    distinguished names (DNs)
    Every entry in a directory has a distinguished name (DN). The DN is the name that uniquely identifies an entry in the directory. A DN is made up of attribute:value pairs, separated by commas, for example:
    cn=Ben Gray,ou=editing,o=New York 
       Times,c=US
    cn=Lucille White,ou=editing,o=New 
       York Times,c=US
    cn=Tom Brown,ou=reporting,o=New 
       York Times,c=US
    

    LDAP DNs begin with the most specific attribute (usually some sort of name), and continue with progressively broader attributes, often ending with a country attribute. The first component of the DN is referred to as the Relative Distinguished Name (RDN). It identifies an entry distinctly from any other entries that have the same parent.

    dynamic groups
    Dynamic groups are groups that are defined using a search expression. When an attribute is added to a directory entry, the entry automatically becomes a member of the group. In addition, simple, efficient methods are provided for client applications to:

    The search expressions can be used in combination with existing group attributes.

    These groups can be used for access control.

    entryOwner
    Each object has an associated entryOwner attribute. The entryOwner attribute might be a user or a group, similar to what is allowed within the aclEntry. However, the entryOwner subject has certain privileges over the object. Entry owners are in essence the administrators for particular objects. They have full access on that particular object, similar to the administrator DN. The administrator has full permission on any object in the database.

    groups
    There are two type of groups:

    Normal groups have an object class of 'GroupOfNames', 'GroupOfUniqueNames' or a user defined group. Access control groups have an object class of 'AccessGroup'.

    Each group object contains a multivalued attribute consisting of member DNs. Groups cannot contain group DNs.

    gsk5ikm
    The gsk5ikm utility is used to create public-private key pairs and certificate requests, receive certificate requests into a key database, and manage keys in a key database. gsk5ikm utilizes a graphical user interface. It provides you with the information you need to perform a task. If you make an error, it issues a message and prompts you again for the information.

    indexing rules
    Index rules attached to attributes make it possible to retrieve information faster. If only the attribute is given, all possible indexes are maintained. IBM Directory provides the following indexing rules:

    See Appendix A, Indexing rules.

    ldapadd
    The LDAP modify-entry and LDAP add-entry tool ldapmodify is a shell-accessible interface to the ldap_modify and ldap_add library calls. ldapadd is implemented as a renamed version of ldapmodify. When invoked as ldapadd the -a (add new entry) flag is turned on automatically.

    ldapdelete
    The LDAP delete-entry tool ldapdelete is a shell-accessible interface to the ldap_delete library call. ldapdelete opens a connection to an LDAP server and binds and deletes one or more entries. If one or more dn arguments are provided, entries with those Distinguished Names (DN) are deleted. Each DN should be a string-represented DN.

    ldapmodify
    The LDAP modify-entry and LDAP add-entry tools ldapmodify is a shell-accessible interface to the ldap_modify and ldap_add library calls. ldapadd is implemented as a renamed version of ldapmodify. When invoked as ldapadd the -a (add new entry) flag is turned on automatically.

    ldapmodrdn
    LDAP modify-entry RDN tool ldapmodrdn is a shell-accessible interface to the ldap_modrdn library call. ldapmodrdn opens a connection to an LDAP server and binds and modifies the RDN of entries. The entry information is read from standard input, from a file, through the use of the - f option, or from the command-line pair DN and RDN.

    ldapsearch
    The LDAP search tool ldapsearch is a shell-accessible interface to the ldap_search library call. ldapsearch opens a connection to an LDAP server and binds and performs a search using the filter . The filter should conform to the string representation for LDAP filters.

    ldif
    LDIF is used to represent LDAP entries in text form. The purpose of this information is to describe the LDAP Data Interchange Format (LDIF), as used by the ldapmodify, ldapadd, and ldapsearch command-line utilities.

    The LDIF tool ldif is a shell-accessible utility that converts arbitrary data values to LDIF. It reads input values from standard input and produces LDIF.

    ldif2db
    This program is used to load entries specified in text LDAP Directory Interchange Format (LDIF) into a directory stored in a relational database. The database must already exist. ldif2db can be used to add entries to an empty directory database or to a database that already contains entries.

    matching rules
    Matching rules describe how to perform a comparison. Supported matching rules are:
    caseExactIA5Match
    caseExactMatch
    caseExactOrderingMatch
    caseExactSubstringsMatch
    caseIgnoreIA5Match
    caseIgnoreMatch
    caseIgnoreOrderingMatch
    caseIgnoreSubstringsMatch
    distinguishedNameMatch
    distinguishedNameOrderingMatch
    generalizedTimeMatch
    generalizedTimeOrderingMatch
    integerFirstComponentMatch
    integerMatch
    objectIdentifierFirstComponentMatch
    objectIdentifierMatch
    octetStringMatch
    telephoneNumberMatch
    telephoneNumberSubstringsMatch
    uTCTimeMatch
     
    

    multiple values
    Multiple values are used to assign more than one value to an attribute. The pencil icon pencil iconindicates the attribute can have multiple values, for example, to accommodate a maiden and married last name. To add multiple values to an attribute, click the pencil icon, then add one value per line. If an attribute contains multiple values, the field displays as a drop-down list.

    nested groups
    Nesting of groups enables the creation of hierarchical relationships that can be used to define inherited group membership. A nested group is defined as a child group entry whose DN is referenced by an attribute contained within a parent group entry. A new attribute has been defined to explicitly distinguish nested groups from ordinary members.

    object class definitions
    Every entry contains an objectClass attribute that identifies what type of information the entry contains. The object class dictates which other attributes can be present in an entry. The directory schema defines the valid attribute types and object classes that can appear in the directory. Attribute type definitions define the maximum length and syntax of its values. Object class definitions specify which attributes MUST be present in an object of that class, as well as attributes that might be present.

    object class types
    Object classes can be structural, for example, person; abstract, for example top; or auxiliary, for example ePerson.

    ownerPropagate
    Owner propagation works exactly the same as ACL Propagation. By default, owners are inherited down the hierarchy tree, and their owner propagate attribute is set to true. If set to false, the owner becomes an override, pertaining only to this particular object.

    ownerSource
    Each object also has an associated ownerSource attribute. This contains the DN of the entry in which the owner values are defined. This attribute is kept by the server but can be retrieved for administrative purposes.

    referrals
    Referrals provide a way for servers to refer clients to additional directory servers. With referrals you can:

    The general format for a referral is: ldap[s]://hostname:port. Typically the format for a referral to a nonsecure server is: ldap://hostname:389 and to a secure SSL server is: ldaps://hostname:636. See Referrals for additional information.

    relative distinguished name (RDN)
    The relative distinguished name (RDN) is the first component of the distinguished name (DN). For example, if the entries DN is cn=John Doe,ou=Test,o=IBM,c=US, the RDN is cn=John Doe.

    replicas
    A replica is a server that runs a copy of the directory. This replicated server can keep a copy of the entire directory or just one tree of that directory. Any update to a replica server is referred to the master server. If the master server fails, you have a copy of the directory trees on the replica server. Using the replica server also improves the response time.

    roles
    Roles are like groups, but contain special permissions granted by the Administrator.

    Secure Sockets Layer (SSL)
    The IBM Directory server has the ability to protect LDAP access with Secure Sockets Layer security. When using SSL to secure LDAP communications with the IBM Directory server, the SSL authentication mechanism known as server authentication is used.

    sorted search
    The sorted search control allows a client to receive search results sorted based on a list of criteria, where each criteria represents a sort key. This moves the responsibility of sorting from the client application to the server, where it might be done more efficiently. For example, you might want to sort a list of employees by surname, common name, and telephone number. Instead of building the search list twice so it can be sorted (once at the server and then again at the client after all the results are returned), the search list is built only once, and then sorted, before returning the results to the client application.

    suffixes
    A suffix is a DN that identifies the top entry in a locally held directory hierarchy. Because of the relative naming scheme used in LDAP, this DN is also the suffix of every other entry within that directory hierarchy. A directory server might have multiple suffixes, each identifying a locally held directory hierarchy.

    Syntax
    Syntax refers to the required format for data. Supported syntaxes are:
    IBM Attribute Type Description 
         Matching Rule Description 
         Name Form Description 
         Attribute Type Description 
         Object Class Description 
         DIT Structure Rule Description 
         DIT Content Rule Description 
         LDAP Syntax Description 
         OID 
         Matching Rule Use Description 
         Boolean - TRUE/FALSE 
         Binary - octet string 
         INTEGER - integral number 
         Generalized Time 
         IA5 String - case-sensitive string 
         Directory String - case-insensitive 
                            string 
         UTC time 
         Telephone Number 
         DN - distinguished name 
    

    Index

    A B C D E G I K L M N O P Q R S T U
    A B C D E G I K L M N O P Q R S T U