From owner-freebsd-questions Sat Nov 9 23:27: 9 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 607D137B401 for ; Sat, 9 Nov 2002 23:27:07 -0800 (PST) Received: from buffnet4.buffnet.net (buffnet4.buffnet.net [205.246.19.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6C25C43E4A for ; Sat, 9 Nov 2002 23:27:06 -0800 (PST) (envelope-from shovey@buffnet.net) Received: from buffnet11.buffnet.net (buffnet11.buffnet.net [205.246.19.55]) by buffnet4.buffnet.net (8.9.3/8.8.7) with ESMTP id CAA92370; Sun, 10 Nov 2002 02:26:58 -0500 (EST) (envelope-from shovey@buffnet.net) Date: Sun, 10 Nov 2002 02:26:56 -0500 (EST) From: Stephen Hovey To: joe Cc: FreeBSD Questions Subject: Re: REASON #7919 NOT to do things as root! In-Reply-To: <200211091725.54547.joe@dubium.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG /etc/passwd is made from master.passwd for those jobbies that still need to look at the old style text file instead of making kernel calls. You can regenerate it - I always forget the damn program name - mk_pwdb or something like that - when I forget, I use vipw, change a latter in my real name in the geco, and save - that regens the whole thing too. On Sat, 9 Nov 2002, joe wrote: > While playing around and trying to set aup a chroot environment > I did the following > cd /home/honza > mkdir {etc,dev,lib,bin,.....} > > cat /etc/passwd | grep honza >/etc/passwd > ^<== location of the > typing oops > The leading "/" was unintended. > > Aaaaaaaaaaaaahhhhh > > Now that everyone has gotten back off their seats from the laughter, on > a more serious note is there anything I can do. Let's pretend I don't > have a backup. ..... ok, now that you've stopped laughing again .... > > Is there anything I can do to recover /etc/passwd > > I just double checked and still seem to have access using other accounts > and I've made a copy of master.passwd in case I "commit" the changes > from passwd. > > -------------------------------------------------------- > Joe Sotham > -------------------------------------------------------- > Christianity got over the difficulty of furious opposites > by keeping them both and keeping them furious. > - G.K. Chesterton > > > > > > 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