How to modify login scripts
In order to set up credentials to run this example, first run the following command. For this example, both source and target server IP addresses are 184.108.40.206 and the source volume is called UNITTEST.
migcred -i 220.127.116.11 -l cn=admin,o=mycompany -W
This will prompt you for a password.
Now you're ready to run a full trustee migration pipe. In the example below mls lists 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 18.104.22.168 -v UNITTEST | maptrustees -s 22.214.171.124 | sed -e 's/DRIVE H:/DRIVE Q:/g' | sed -e 's/MAP H:/MAP Q:/g' > maptrustees2.yaml
A good experiment is to run the following type of command:
mls -s 126.96.36.199 -v UNITTEST | maptrustees -s 188.8.131.52 > maptrustees.yaml
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 184.108.40.206 -i
The -d option specifies the LDAP target server address. This modifies the login script for users. If you specify a different -d tree than the -s tree stated in maptrustees, the users are created in the new tree according to the data provided in the maptrsutees2.yaml file.