From owner-freebsd-questions@FreeBSD.ORG Wed Aug 21 15:19:36 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 882EB9D2 for ; Wed, 21 Aug 2013 15:19:36 +0000 (UTC) (envelope-from feld@FreeBSD.org) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5DFFB2366 for ; Wed, 21 Aug 2013 15:19:36 +0000 (UTC) Received: from compute5.internal (compute5.nyi.mail.srv.osa [10.202.2.45]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 8C81E2256E for ; Wed, 21 Aug 2013 11:19:34 -0400 (EDT) Received: from web3 ([10.202.2.213]) by compute5.internal (MEProxy); Wed, 21 Aug 2013 11:19:34 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:from:to:mime-version :content-transfer-encoding:content-type:in-reply-to:references :subject:date; s=smtpout; bh=gX+86fvD9z8e1HYYpMhuCMCQgDc=; b=UTH fgDKqqFZzZbH4hjwhICD2RZnRjAbD32gScqk3kQI6M3KYND9+Y88gpDhpajC3ulk 19mDmQPWnHBhFzRhCFFGjADyskK2WFWPFmfLjUTG0G6mBAINbwWhNgL+elBG6p46 5MaL4cMg4WVWEf2dTTacGzGPrH8SYC9dVzKJDCJw= Received: by web3.nyi.mail.srv.osa (Postfix, from userid 99) id 0967CB02388; Wed, 21 Aug 2013 11:19:34 -0400 (EDT) Message-Id: <1377098373.4728.12478481.06E49ED9@webmail.messagingengine.com> X-Sasl-Enc: J6BeIw3fE1eq/Oy/5oVABSY6B92Cq0jWEOyw8k9Jwgam 1377098373 From: Mark Felder To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Mailer: MessagingEngine.com Webmail Interface - ajax-d009844e In-Reply-To: References: Subject: Re: Renumber users and groups Date: Wed, 21 Aug 2013 10:19:33 -0500 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Aug 2013 15:19:36 -0000 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 :)