The following example is a continuation from the user data population example shown in "Populating the Directory with User Data--Sample Session" on page 319. It also assumes that you have extracted the user mail-aliases information from NIS+ and are now attempting to populate the directory with user aliases data for Alpha Corporation, Inc. as shown below. The user mail-alias being created is called testsubject and it will have two people as its members, John Doe and Gail Evert. The owner of the alias is designated as admin. The distribution list mail-alias is called testsubject-list, and it has owner owner-testsubject-list and automated request alias testsubject-list-request. The owner is user jdoe and the distribution list has two members, gevert and jdoe.
testsubject: gevert,jdoe
owner-testsubject: admin
testsubject-list: jdoe,gevert
testsubject-list-request: jdoe
owner-testsubject-list: jdoe
To create directory entries for these user aliases, complete the following steps:
1. | Log in as root.
|
Note - Since you have to populate the directory with user data before you populate it with user aliases data, and since the process of extracting user, user aliases, and distribution list data is the same, you have already completed steps Step 3 to Step 5 as part of Populating the Directory with User Data--Sample Session." This section does not repeat these steps.
2. | Copy the imldifsync.conf file to groups.conf to keep the user population data distinct from the user aliases population data:
|
3. | Edit the groups.conf file, change the add-val line as shown below and change the mode token from users to groups.
|
mail-domain value should be lower down in the same file. |
4. | Change directories to the location shown and convert the user aliases list data to LDIF format. |
Use the imldifsync command to generate formatted user aliases data files (LDIF files).
|
You will see the following results on the screen:
|
Note - By default, the mail folder will be set to the Sun Message Store.
The file user_aliases.ldif contains the following:
CODE EXAMPLE 10-1 Contents of the user_aliases.ldif File for User Aliases (1 of 2)
5. | Change directories to the location shown and populate the directory with the user aliases LDIF formatted data. |
Use the ldapmodify command to add the new entries to the directory:
|
You will see the following results on the screen:
|
6. | Verify that the entries are present in the directory, using the ldapsearch command.
|