Command Line Migrate

Command Line Migrate

This tool is a perl script that will trigger an account to be migrated to a connected system.

This functionality is found in iManager in the DriverSet view, however, it is limited in functionality. In iManager you can select individual accounts to migrate or select by container. This is good if you want to do one or two or all users. What if, however, you have a list of 1,000 accounts spread across multiple containers? This tool addresses this problem while also making it easier to migrate 1 or 2 accounts, especially for those that live by the command line.

To run the script you must install perl (I use v5.10.0) and the perl-ldap module. The script is contained in the migrate.pl file. The migrate.conf file contains the ldap server parameters.

Syntax for migrate.conf:
$ldapServer                      = '192.168.1.1';
$ldapServerPort = '686';
$ldapUserDN = 'cn=brad,ou=People,o=novell';
$ldapUserPass = 'sneakyPassWord';
$ldapSearchBase = 'o=novell';



Syntax for migrate.pl:

# ./migrate.pl  


<uid> = the search criteria to be executed. It can return a single entry or multiple entries.

<Driver> = the name of the driver to migrate the account(s) across. The value does not have to be the complete driver name, but is should be unique so as to distinguish it from other drivers.

Examples:

To migrate a single account, cn=brad,ou=people,o=novell across the driver, cn=edir,cn=DriverSet,ou=services,o=novell execute the command:

# ./migrate.pl cn=brad eDir


To migrate all accounts that start with "b" across the eDir driver execute the command:

# ./migrate.pl cn=b* eDir


To migrate a bulk list of accounts across the eDir driver execute a shell script containing the list of commands to execute:

./migrate.pl cn=adam eDir
./migrate.pl cn=brad eDir
./migrate.pl cn=carol eDir



The code is free to use. Feel free modify to meet your specific needs or send me any suggestions.

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2008-11-06 21:55
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.