Novell Home

Removing Rights for Home Directory Users

Novell Cool Solutions: Tip
By Jim Henderson

Digg This - Slashdot This

Posted: 18 Apr 2007
 

Problem

A Forum reader recently asked:

"Pretty soon I will have to delete the home directory file systemrights for about 2000 users and 1000 group rights. Can you share an example of a batch script that would get me started?"

And here's the response from eDirectory expert Jim Henderson ...

Solution

Given a text file with a list of user IDs and all home directories on the same system, and assuming the CN was used for the directory name, you could do something like this:

--- userfile.txt ---

user1.context.org
user2.context.org
user3.context.org
user4.context.org

--- end ---

awk 'BEGIN {FS="."} {print "rights " $1 " rem /n=." $0}' >
removerights.bat

Then run removerights.bat. (This is assuming I have the right command-line parameters for the old DOS RIGHTS command.)


Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© 2014 Novell