[lug] group perm nightmare

Rob Nagler nagler at bivio.biz
Fri Oct 4 13:24:06 MDT 2002


> I am migrating users from an old mandrake system to a new RH8.0 system.It 
> contains a mix of users with 'users' as the group.  I'd like to tie this 
> down a bit by making both owner:group the same recursivly as a new useradd 
> would by default.  Anyone have a script for this?

find is your friend:

    for f in <users...>; do
    	find /home -user $f -group user | xargs -n 100 chgrp $f
    done

You probably don't want to do this in /etc or /var.  

Rob

    





More information about the LUG mailing list