Removing Rights for Home Directory Users

0 Likes
over 14 years ago

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.)

Labels:

How To-Best Practice
Comment List
Anonymous
Related Discussions
Recommended