From owner-freebsd-questions Sat Nov 9 17:25:46 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 DCA4C37B401 for ; Sat, 9 Nov 2002 17:25:44 -0800 (PST) Received: from mail.dubium.com (h24-78-225-134.vn.shawcable.net [24.78.225.134]) by mx1.FreeBSD.org (Postfix) with ESMTP id DCECB43E6E for ; Sat, 9 Nov 2002 17:25:43 -0800 (PST) (envelope-from joe-dated-1037323668.d621ae@dubium.com) Received: (qmail 80728 invoked from network); 10 Nov 2002 01:27:48 -0000 Received: from localhost (HELO fafner.dubium.com) ([127.0.0.1]) (envelope-sender ) by 0 (qmail-ldap-1.03) with SMTP for ; 10 Nov 2002 01:27:48 -0000 Content-Type: text/plain; charset="us-ascii" To: FreeBSD Questions Subject: REASON #7919 NOT to do things as root! Date: Sat, 9 Nov 2002 17:25:54 -0800 User-Agent: KMail/1.4.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200211091725.54547.joe@dubium.com> From: joe X-Delivery-Agent: TMDA/0.64 (Lawrin) 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 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