Restore special trustees, you filter out from the complete trusteelist created from TRUSTEE.NLM. Tested on NetWare 6.0 Server.
#!/usr/bin/perl
#
# create trusteelist on server with 'load trustee.nlm save all sys:trstlist.txt'
# will be a good idea to do this with CRON on every sunday
# open the file
$file = "sys:\\trstlist.txt";
open (IN, $file) or die "Unable to open the file $file";
# open handle for the output file
open (OUT, ">sys:\\tsearch.txt");
# without this line, restore would not work
# modify it, if you have a different version
print OUT "TRUSTEE.NLM v1.10\n";
# for every line in the file ...
while (<IN>)
{
# modify here, if you search for IRM or something
if ($_=~/\"TRUSTEE\"/)
{
# modify here for the path
# maybe you search for trustees on special path/volume
if ($_=~/\"SYS:/) { print OUT "$_"; print "$_"; }
}
}
close (OUT);
close (IN);
# now restore on console with 'load trustee.nlm restore sys:\tsearch.txt'
# .. have fun
--haddoc
© 2008 Novell, Inc. All Rights Reserved.