Article

hendersj's picture
article
Reads:

3080

Score:
0
0
 
Comments:

0

Removing Rights for Home Directory Users

Author Info

18 April 2007 - 1:26am
Submitted by: hendersj

(View Disclaimer)

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


Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).

It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.




User Comments

© 2013 Novell