Renaming user accounts and home directories is quite straight forward with EMU - as long as you're comfortable with doing a bit of spreadsheet manipulation. Renaming accounts with EMU is a four-phase process:
- Rename the Account
- Rename the Home Directories
- Re-link the New Account Names to the New Home Directories
- Re-assign Home Directory Trustee Assignments.
If there are GroupWise accounts associated with the eDirectory accounts, please refer to How to rename eDirectory & GroupWise accounts.
Phase One: Rename the Account
1. Use EMU to export the login name and other information of the accounts to be renamed. There must be a value that is exported that can be used to link to the new names. For example, if the StudentID is the value that is common the the eDirectory values and your student management system or your human resources system, you would need to export that value. If the home directories to be renamed do not have the same parent home directory, make sure you export the link to the original home directory because that link will be broken once you rename the account or home directory. The home directory information is only required if you use Phase Two (Optional).
2. Add the new names to a column called "NewNames". You will have to use some field matching strategy to match the old name to the new name. This column should be in the column to the right of the current user names. Save the changes as NewNames.CSV file (text values). Do not save the changes in Excel format.
3. Open the file in Notepad. You should see the header row and the data in comma separated format. This confirms that the file can be accessed by EMU.
4. Highlight the users in EMU whose names you want to change and Right-click one of the accounts.
5. Select the "Modify Accounts from File" option and select the NewNames.CSV file.
6. Select the Account Identifier Field in the data file that links to the login name or the distinguished name or the unique eDirectory value and select the eDirectory Field to Match.
7. Select the "Highlighed Accounts" tab to view the accounts that match. Matching accounts show as green, unmatched accounts show as red.
8. Select the NDS tab in the top menu.
9. Select the Identification tab in the side menu.
10. Select the User Name in the NDS field list.
11. Check to Modify the value, Replace Existing and chose the field from the data file that contains the new name value.
12. Select Modify.
13. User accounts are now renamed.
Phase Two (Standard): Rename the Home Directories
The objective of Phase Two is to manipulate the .CSV file to create a batch file that you will run to rename the home directories from the old user name to the new user name. There are many ways to achieve this objective. This option assumes the home directories have the same parent. Phase Two (Optional is used if the user home directories do not have a common parent directory).
1. Open the NewNames.CSV data file.
2. Save this file as a new name (NewHD.CSV) because you are going to manipulate the content of this file. It must be saved as a .CSV file with text values.
3. Insert two columns in front of the original user name. Call this column "Rename". In the first data field in the column, write the word "rename" and copy this down to all of the fields in that column.
In the first field, type "Space1". In the first data field in the column, add a space and copy it down to all of the fields in the column.
Insert a column between the "OldNames" column and the "NewNames" column that you created in Phase One. Call this column "Space2". Add a space to the first field in this column and copy this space down the column.
4. Create a new column and add "Formula" in the first field of the column. In the second field, use the concatenate command to join the fields such that you end up with the correct syntax. The formula will look something like: =B2&C2&D2&E2&F2 and should produce a result similar to: rename richcham 08chamardrichard Copy this formula down to all of the fields in the column.
5. Right-click and Copy the "Formula" column.
6. Select a new column. Right-click the column and select "Paste Special".
7. Select the Values radio button to paste the values rather than the formula.
8. Delete the content of the first field.
9. Delete all of the columns expect the column with the values information.
10. Save this file as Batchfile (CSV value). Excel will append the .CSV extension. Exit Excel.
11. Rename the file to batchfile.bat and copy it to the parent home directory of the home directories to be renamed.
12. Open the file in Notepad. You should see the rename commands as text data. This confirms that the file can be accessed by EMU.
13. Double-click the .bat file to run it or open a DOS prompt, change to the parent home directory and execute the .bat file.
14. User Home Directories have now been renamed.
Phase TWO (Optional):
The objective of Phase Two is to manipulate the .CSV file to create a batch file that you will run to rename the home directories from the old user name to the new user name. There are many ways to achieve this objective. This option assumes the home directories do NOT have the same parent directory. For home directories that have different parent directories or parent directories on different volumes, you will need to manipulate the data such that you end up with commands like the following where F:, G:, H:, drives are mapped to the appropriate volumes/locations of the parent directory:
rename F:\users\homedirs\richcham 08chamardrichard
rename G:\users\2008\gordwell 08wellinggordon
rename H:\users\2009\shangaud 09gaudryshane.
You will need to use the approriate Excel functions to carry out this data manipluation. Following is one suggestion of how that can be done.
1. Open the data file that you used to export the location of the home directory.
2. Save this file as a new name because you are going to manipulate the content of this file.
3. Copy the column that has the new user name into a column behind the column with the home directory values.
4. Map a drive to the root of the volume that contains the parent home directories. In this case, we will use H:.
5. Insert three columns in front of the first column. In the first column write the word "rename" in the first field and copy this down to all of the fields in that column.
6. In the first field in the second column, type H:\ and copy this down to all fields in the column.
7. In the first field in the third column, add a space and copy it down to all fields in the column.
8. Insert a column in front of the column that contains the new home directory name (the user name). In the first field, add a space and copy this space down to all of the fields in that column.
9. Do a "Find and Replace" function to replace the name of the volume with H:\. For example: Replace \\data\vol1\ with H:\
10. Using the strategy described in step 4 in Phase Two (Standard), concatenate the fields into a new column such that you end up with the following command:
rename F:\users\homedirs\richcham 08chamardrichard
rename G:\users\2008\gordwell 08wellinggordon
rename H:\users\2009\shangaud 09gaudryshane.
5. Continue with steps 5-14 from Phase Two (Standard).
Phase Three: Re-link the New Account Names to the New Home Directories
Use EMU to re-link the eDirectory home directory value to the renamed home directories.
1. In EMU, highlight the user accounts. Right-click and select Modify.
2. Select the Home Directory Tab in the top menu.
3. Select Modify Home Dir - Adv. in the side menu.
4. Check "Reassign NDS Home Directory Pointers".
5. Browse to the appropriate parent directory and select Modify.
Phase Four: Re-assign Home Directory Trustee Assignments
Use EMU to re-assign home directory trustee assignments
1. In EMU, highlight the user accounts. Right-click and select Modify.
2. Select the Home Directory Tab in the top menu.
3. Select Modify Home Dir in the side menu.
4. Select the Trustee Assignments and size limits as required.