Renumber users and groups

Mark Felder feld at FreeBSD.org
Wed Aug 21 15:19:36 UTC 2013


On Wed, Aug 21, 2013, at 7:36, Olivier Nicole wrote:
> 
> Is there a clever/fast way to do that (other than find -exec chown)?
> 

Maybe! I haven't tried this myself yet, but next time I need to do this
I think I'm going to take an mtree backup of the entire filesystem,
change the UIDs and GIDs (vipw, then vi /etc/groups), and then re-apply
the mtree to the entire filesystem. It should find all the files that
are now orphaned and fix them to use the new UID/GID that you specified.
:)

> What pitfall should I avoid?
> 

Not having a backup :)


More information about the freebsd-questions mailing list