Question: How can you use EMU to find and delete orphan home directories?
Answer: This requires three separate operations:
- Use EMU to find the orphan home directories and generate a delete batch file.
- Modify the batch file
- Run the batch file
To Generate the Orphan Home Directories Delete Batch File
- Open EMU.
- Select "Tools" > "Reports" > "Orphan Home Directories".
- In the "Report" window, click Next >.
- In the "Select Reports Context" window, container in eDirectory that will contain the volume objects where the home directories are located and click Next >.
- In the "Directory Location" window select the volume that contains the home directories and click OK.
- This will produce a "Results" window. Click Export to create a .csv file with the list of orphan directories. Click Generate to create a batch file that will flag and remove orphan directories.
Modify the Batch File
EMU has an issue with creating the batch file and produces a lines similar to:
Code:
flag "\\sample-tree\.fs1_sys.servers.omni\Home\user1\*.*" n /s /c
del /Q /F /S "\\sample-tree\.fs1_sys.servers.omni\Home\user1"
rmdir "\\sample-tree\.fs1_sys.servers.omni\Home\user1" |
|
|
Modify the batch file created to ensure that there are two flag, one del and one rmdir lines for each home directory. Please ensure that the options displayed in this sample are used in your batch file:
Code:
flag "\\sample-tree\.fs1_sys.servers.omni\Home\user1\*.*" -sy -h -ri -di -ro /s /c /fo
flag "\\sample-tree\.fs1_sys.servers.omni\Home\user1\*.*" -sy -h -ri -di /s /c /do
del /Q /F /S "\\sample-tree\.fs1_sys.servers.omni\Home\user1"
rmdir "\\sample-tree\.fs1_sys.servers.omni\Home\user1" /s /q |
|
|
Run the Batch File to Remove Orphan Home Directories
To run the FLAG command that is in the batch file, you need to ensure that there is a mapped drive that points to the SYS:PUBLIC directory on your netware server. You can use the PATH command in a command prompt window to confirm if an appropriate path exists.
- Run the modified .BAT file from a command prompt window to permanently remove the orphan home directories.