This bash script will parse the trustees kept in the NCP trustee_database.xml file (media/nss/VOLUME/._NETWARE/.trusteee_database.xml) for the supplied NSS volume and create a script that will remove the trustees using the “ncpcon rights” commands.
Save Example (backs up all NSS VOL1 metadata):
metamig save VOL1 > metamig-bu-VOL1.txt
Restore Example (restores only trustee NSS VOL1 metadata)
metaming restore VOL1 -m t < metamig-bu-VOL1.txt
Steps to use:
- Extract the ncp-remove-trustees.tgz file with “tar xzvf ncp-remove-trustees.tgz” Then make ncp-remove-trustees.sh executable.
- Execute the ncp-remove-trustees.sh script as the “root” user and supply the volume name.
Where you execute the script from will be where the ncpcon-remove-VOLUME.sh script will be located. Other files needed for processing are /tmp/trusteepath-VOLUME.txt and /tmp/trusteename-VOLUME.txt (delete them when you no longer need them)
The ncp-remove-trustees.sh script will not remove any trustees from the volume. You have to execute that output script for trustees to actually be removed. This lets you see what it is going to do before you execute ncpcon-remove-VOLUME.sh
- Add the execute permission to ncpcon-remove-VOLUME.sh
- Run the ncpcon-remove-VOLUME.sh script.