CASE STUDY: Changing Domain, UserId, and Email Address in the Altiris Database Using Connector Solution and Microsoft Active Directory Import Rules

Article:HOWTO8140  |  Created: 2007-10-09  |  Updated: 2007-11-05  |  Article URL http://www.symantec.com/docs/HOWTO8140
Article Type
How To



Question

How can I change Domain, UserId, and Email Address in the Altiris Database using Connector Solution and Microsoft Active Directory Import Rules?

Answer

Important: To reduce Altiris Database corruption, All changes to the Altiris Database must be made through the Altiris Console or other Altiris provided tools such as Altiris Connector Solution, Altiris CMDB Solution, OR Microsoft Active Directory Connector.

Altiris cannot support Altiris Databases that have been modified by manually changing the databases tables because all the needed modifications may not be made.

If you have manually modified the altiris database and are having problems with the altiris system, you will need to use a backup of the last known working database.

Overview

Scenario: The company has changed its name and domain from “smallcompany” to “bigcompany”, and has also changed its user names (“UserId” in Altiris and “User login name” in Active Directory) and email convention standards. Before the change, the company used the user’s first initial and last name for the username (“UserId” in Altiris, “User login name” in Active Directory) and email address, but now the company is using a unique employee number for the username, and the unique employee number and the new company name for the email address. For example, John Doe’s username was “jdoe”, but will change to his employee number “E12345”. His email address was “jdoe@smallcompany.com”, but will change to “E12345@bigcompany.com”.

The Altiris Administrator wants to update the user information in the Altiris Database and Altiris_Incidents Database to the new conventions and standard while maintaining the integrity of the data.

The Altiris Administrator also wants to be able to use the Microsoft Active Directory Import rules to update information about the users and add new users to the Altiris System without creating a separate, new record for people already in the Altiris system.

In this case study, we are going to:

  • Disable Microsoft Active Directory Import Rules if they are enabled.
  • Create .csv file as a place holder for a new AltirisUserDB data source.
  • Create a data source.
  • Create a Resource Import/Export Rule.
  • Modify the .csv file to change the User ID, Domain, and Email information using Excel or other editor.
  • Modify the Data Source to allow imports.
  • Edit the Resource Import/Export Rule to allow Imports.
  • Test the Rule.
  • Run the Rule.
  • Verify that the information was updated in the Altiris Database
  • Allow the Altiris Incidents database to synchronize with the Altiris Database.
  • (Optional) Update Active Directory Import to the new Active Directory (that has the new domain\username)

Procedure

Disable Microsoft Active Directory Import Rules if they are enabled

You don’t want an Active Directory Import to run while you are updating the data in the Altiris Database because, if the information was changed in the database and the Active Directory Rule ran, duplicate records could be made for the same resources.

  1. In the Altiris Console, click Configuration tab > Server Settings > Notification Server Infrastructure > Microsoft Active Directory Import.
  2. In the right pane, disable the rules and click the Apply button.

Create a .csv file to be a place holder for the data source information

For this case study, create a new, empty file called AltirisUserDB.csv at C:\Temp\Export.

Create the data source

  1. Right-click New > CSV File Data Source. In the right pane, the CSV File Data Source Configuration page appears.
  2. In the Name field, enter a descriptive name. In this case study, use “AltirisUserDB_source”.
  3. (Optional.) In the Description field, enter a description.
  4. Click the Allow Exports check box. The form will expand.
  5. In the When performing an export field, select Write data to a new file for every export.
  6. In the Export directory field, enter the folder where the data will be exported to. In this case study, enter “C:\Temp\Export”.
  7. In the New file name prefix field, enter a descriptive name for the information being exported.In this case study, enter “AltirisUserDB”.
  8. In the File extension field, enter file extension type. In this case study, enter “csv”.
  9. In the Maximum file size () field, leave the default of “200”.
  10. Click the Test Data Source button. When the form is set up correctly, the message, “Details have been saved” and “Test successful” will appear.
  11. Click the Apply button. The message “Details have been saved” will appear.

 Create a Resource Import/Export Rule

  1. In the Altiris Console, click Configuration tab > Solution Settings > Connectors.
  2. Right-click Import/Export Rules.
  3. Click New > Resources Import Export Rule. In the right pane, the Import/Export Rule Configuration page appears.
  4. In the Name field, enter a descriptive name. In this case study, use “AltirisUserDB_rule”.
  5. (Optional) In the Description field, enter a description.
  6. In the Data Source field, select the data source. In this case study, enter AltiriUserDB_source. The form will expand.
  7. In the Replication Direction field, select “Export”.
  8. In the Resource Type field, enter the resource type. In this case study, enter “User”.
  9. In this case study, leave the Only export changed resources check box clear.
  10. In this case study, leave the Export filter field blank.
  11. Click the Column Mappings heading. The form will expand.
  12. Leave the Resource Name field blank.
  13. Leave the Resource Type field blank.
  14. In the Resource Guid field, enter “Resource_guid”.
  15. In the Data Class Mappings section, leave the fields with the default entries.
  16. In the Association Mappings section, clear the fields, making sure to delete and spaces.
  17. In the Reverse Associations Mappings clear the fields, making sure to delete and spaces.
  18. Test the export rule by clicking the Test Rule button.

    Note: If the message, “Unable to save details. Output column ‘ ‘ has been specified multiple times. Each output column can only be selected once.” appears, make sure the blank fields do not contain spaces.
  19. When the Item Task Status dialog appears with the success message, click Close.
  20. Click Apply to save the settings. The message “Details have been saved” will appear.
  21. Click the Run Now button to export the information.
  22. When the Item Task Status dialog appears with the success message, click Close.

Modify the .csv file to change the User ID, Domain, and Email information using Excel or other editor

  1. In the Windows Explorer, open the exported .csv file with Excel or other editor. In this case study, the file is at C:\Temp\Export\AltirisUserDByyyy-mm-dd-hh-mm-SSS.csv.
  2. Modify the information:
    • Important: Do not change the information in the Resource_guid column. It is the key that will be used to import the information back into the Altiris Database.
    • In the UserId column, change the cell to use employee number. In this case study, change “jdoe” to the employee number “E12345”.

      Note: The UserId column contains the information from Microsoft Active Directory’s “User login name”.
    • In the Domain column, change the cells to use new domain name. In this case study, change “smallcompany” to “bigcompany”.

      If you are going to be importing updated user information from a Microsoft Active Directory Import, that is all you need to change in the file because the rest of the information will be changed to the information in active directory based on the Domain and UserId when the Microsoft Active Directory Import is run.

      If you are not going to be importing updated user information from a Microsoft Active Directory Import, you may update information in the other columns (Do not change the Resource_guid column). In this case study, update the information in the following columns:
      • In the Email column, change the cells to use the new email format. In this case study, change jdoe@smallcompany1.com to E12345@bigcompany.com.
      • (Optional) In the Employee ID column, change the cell to use employee number. In this case study, change “jdoe” to “E12345”.
  3. Save the file. In this case study, save the file at C:\Temp\Import\ AltirisUserDByyyy-mm-dd-hh-mm-SSS.csv.

Modify the Data Source to Allow Imports

  1. In the Altiris Console, click Configuration tab > Solution Settings > Connectors > Data Sources > data source name. In this case study, click “AltirisUserDB_source”.
  2. Click the Allow Imports checkbox. The form will expand.
  3. In the Import file field, enter the file where the data will be imported from. In this case study, enter “C:\Temp\Import\ AltirisUserDByyyy-mm-dd-hh-mm-SSS.csv”.
  4. Click the Test Data Source button. When the form is set up correctly, the message, “Details have been saved” and Test successful” will appear.
  5. Click the Display import data link. The Data Source View window opens with a table of the data available for import from the data source.Verify that the changes you made are included in the imported data. When done verifying, close the window.
  6. Click the Apply button. The message “Details have been saved” will appear.

    Note: The data from the data source is not imported yet.

Edit the Resource Import/Export Rule to Allow Imports

  1. Click Configuration tab > Solution Settings > Connectors Import/Export Rules > rule_name. In this case study, click “AltirisUserDB_rule”. In the right pane the Import/Export Rule Configuration page appears for the “AltirisUserDB_rule”.
  2. In the Replication direction field, select Import. The form will expand.
  3. In the Resource Type field, select User.
  4. Make sure the Multiple resource type import check box is not checked.
  5. Make sure the Allow resource creation check box is not checked.
  6. Make sure the Allow resource update check box is checked.
  7. Make sure the Resource delete check box is not checked.
  8. Make sure the Data filter field is blank.
  9. Make sure the Import processing rate field is set at Fast.
  10. Click the Column Mapping section. The form will expand.
  11. In the Resource Lookup Key (required) field, select Resource Guid. The form will expand.
  12. In the Guid field, select resource_guid.

    Important: In the Resource Name field, make sure Select a column is displayed. If you choose one of the other options, the user name (name of the resource) will be change to the content of the applicable selection.
  13. Make sure there are no entries in the Association Mappings and Reverse Associations Mappings sections.
  14. Click the Apply button. The message “Details have been saved” will appear.

Test the Rule

  1. Click the Test Rule button. When the Item Task Status box appears, review the information, then click the View Full Log link for specific details.
  2. If the export rule test works, click the Apply button to save the rule.
  3. If the export rule test doesn’t work, make changes as needed and retest.
  4. After making changes, click the Apply button to save the settings.

Run the Rule

  1. Click the Run Now button. The information from the data source identified in the import/export rule is written to the Altiris Database.

Verify that the Information was updated in the Altiris Database

  1. In the Altiris Console, click the Resources tab > Resource Management > Resources > Organizational Types > Users. In the right pane, verify that the name, domain, and email have been updated.

    In this case study, the name that had been “jdoe” is now “E123245”, the domain that had been “smallcompany” is now “bigcompany”, and the email address that had been “jdoe@smallcompany.com” is now E12345@bigcompany.com.
  2. Double-click on the row to open the EditCreateResource window.
  3. Scroll down and verify the Email field, the UserId field, the Domain field, and the Employee ID field is updated.

Allow the Altiris Incidents Database to Import Data from the Altiris Database

The Helpdesk/Incidents data will be updated to the new information in the Altiris Database based on a schedule, which by default is set to run every hour. Because the Helpdesk/Incidents data is updated using the user resource guid as the key (which was not changed), the corresponding data in the Altiris_Incidents database will be updated without duplicates being made.

(Optional) Update Active Directory Import to the new Active Directory (that has the new username/domain)

If you want to use the Microsoft Active Directory Import, modify the Microsoft Active Directory Import rules to use the new domain.

Because the Altiris Database has been updated with the new domain and new user information, when the Active Directory Import rule is run, the rule will compares Domain and UserId information in Microsoft Active Directory with the Domain and UserId information in the Altiris Database. Because the Altiris Database already has a record for the users with the new Domain and new UserId, duplicate records will not be created for those users. If other information for the user has been changed in Active Directory, that information will be updated in the Altiris Database. New users in Active Directory will also be added to the Altiris Database.


Legacy ID



38689


Article URL http://www.symantec.com/docs/HOWTO8140


Terms of use for this information are found in Legal Notices