How to change target containers for migrated users

From MicroFocusInternationalWiki
Jump to: navigation, search

For this example, both source and target server IP addresses are and the source volume is called UNITTEST.

In order to set up credentials to run this example, first run the following command:

 migcred -i -l cn=admin,o=mycompany -W

This prompts you for a password.

Now you're ready to run a full trustee migration pipe. In the example below, mls will list all users and groups with explicit rights on the NetWare source server and volume UNITTEST. The output of mls is piped to maptrustees which specifies the source LDAP server where the file server exists. (In this case, the source file server and LDAP server are the same). The output of maptrustees is piped through a couple of sed commands. The sed commands modify the login script output from maptrustees. Finally, the sed output is piped into a file.

 mls -s -v UNITTEST | maptrustees -s | sed -e 's/ou=old-ou1,o=old-o1/o=new-o/g' | sed -e 's/ou=old-ou2,o=old-o2/o=new-org/g' > maptrustees2.yaml

A good experiment is to run the following type of command:

 mls -s -v UNITTEST | maptrustees -s > maptrustees.yaml

Then run

 diff maptrustees.yaml maptrustees2.yaml

This displays the changes made to the yaml file.

After creating the maptrustees2.yaml file with login script changes, run the following:

 migtrustees -d -i

The -d option specifies the LDAP target server address. This will modify the login script for users. If you specify a different -d tree than the -s tree stated in maptrustees, then users will be created in the new tree according to the data provided in the maptrsutees2.yaml file.