Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Aug 2013 10:19:33 -0500
From:      Mark Felder <feld@FreeBSD.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: Renumber users and groups
Message-ID:  <1377098373.4728.12478481.06E49ED9@webmail.messagingengine.com>
In-Reply-To: <u9zjsb8bkz.fsf@banyan.cs.ait.ac.th>
References:  <u9zjsb8bkz.fsf@banyan.cs.ait.ac.th>

next in thread | previous in thread | raw e-mail | index | archive | help
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 :)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1377098373.4728.12478481.06E49ED9>