[mdlug] chown -R recovery + sanity check

mdlug at wowway.com mdlug at wowway.com
Wed Dec 17 08:02:42 EST 2008


Hello again, one more thing:  Is there a way to do it so that I can stop and
check the results on first couple and then let it go?

This is what I was thinking, in psuedocode

For each entry in `ypcat passwd`
      $USERNAME = awk <awk command to extract username>
      chown -R $USERNAME $USERNAME
      pause;
      if OK continue else break
Done

Thanks again, Dean

Hello, let's say I have a system where there are hundreds of users, with a
system of NIS-mapped home dirs such as this:

/filesystem/vol/users/user1
/filesystem/vol/users/user2
/filesystem/vol/users/user3
...
/filesystem1/vol1/users/userX

and each user is owner of their own home dir.

Accidentally, I go through at the level of /filesystem/vol and
I chmod -R user1 *   (I know, that was a mistake).

Is there a way to run back through that and chown everyone back?




More information about the mdlug mailing list