Date: Sun, 10 Nov 2002 12:20:03 +1030 From: Greg 'groggy' Lehey <grog@FreeBSD.org> To: joe <joe-dated-1037323668.d621ae@dubium.com> Cc: FreeBSD Questions <freebsd-questions@FreeBSD.ORG> Subject: Recovering /etc/passwd (was: REASON #7919 NOT to do things as root!) Message-ID: <20021110015003.GB93051@wantadilla.lemis.com> In-Reply-To: <200211091725.54547.joe@dubium.com> References: <200211091725.54547.joe@dubium.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday, 9 November 2002 at 17:25:54 -0800, 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 That's trivial. # pwd_mkdb -p /etc/master.passwd /etc/passwd doesn't get used much any more. The real files are /etc/pwd.db and /etc/spwd.db. See the man page for pwd_mkdb for more details. Greg -- When replying to this message, please copy the original recipients. If you don't, I may ignore the reply or reply to the original recipients. For more information, see http://www.lemis.com/questions.html See complete headers for address and phone numbers To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021110015003.GB93051>