From owner-freebsd-questions Thu Sep 21 8:47:49 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mail.telestream.com (mail.telestream.com [205.238.4.5]) by hub.freebsd.org (Postfix) with ESMTP id 2075A37B423 for ; Thu, 21 Sep 2000 08:47:47 -0700 (PDT) Received: from localhost (keith@localhost) by mail.telestream.com (8.11.0/8.11.0) with ESMTP id e8LFkaX18213; Thu, 21 Sep 2000 08:46:36 -0700 Date: Thu, 21 Sep 2000 08:46:36 -0700 (PDT) From: To: Odhiambo Washington Cc: FreeBSD-Questions Subject: Re: RECOVERY In-Reply-To: <20000921183848.G12637@siafu.iconnect.co.ke> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Something like this would work. #!/bin/sh LS="/home" #or what ever the path is. for name in $LS do chown -R $name.$name /home/$name done ================================= Keith W. At the helm My non work related site www.cydonia.net ================================= On Thu, 21 Sep 2000, Odhiambo Washington wrote: > I was working with a trainee under me (he's learning abit of UNIX from a > novice who is me ;-)). This is on a TESTING BOX so this guy logs in as > root, cd /usr/home where we have about 80 directories with various > owners!! > Then what does he do? he did chwon -R * some_user > Now I need to rename the folders to the rightful owners. > I sound quite comfortable about this but I DO NOT know how I can do it. > Someone MUST be knowing how some script can help me do that, especially > because the users have uniq uids in the /etc/passwd..somehow?????? > > Thanks in advance. > > Wash > > -- > Odhiambo Washington > Systems Administrator > Inter-Connect Ltd. > 3rd Flr The Chancery > Valley Rd > PO Box 39519 Nairobi, KENYA > Tel: 254 2 711140 > Fax: 254 2 718418 > > If little else, the brain is an educational toy. -Tom Robbins > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message