From owner-freebsd-questions Sun Aug 4 21:16:44 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 2F95B37B400 for ; Sun, 4 Aug 2002 21:16:42 -0700 (PDT) Received: from wantadilla.lemis.com (wantadilla.lemis.com [192.109.197.80]) by mx1.FreeBSD.org (Postfix) with ESMTP id D77EB43E4A for ; Sun, 4 Aug 2002 21:16:40 -0700 (PDT) (envelope-from grog@lemis.com) Received: by wantadilla.lemis.com (Postfix, from userid 1004) id 3DF7681470; Mon, 5 Aug 2002 13:16:34 +0930 (CST) Date: Mon, 5 Aug 2002 13:16:34 +0930 From: Greg 'groggy' Lehey To: Desmond Lee Cc: freebsd-questions Subject: Re: root unkown? Message-ID: <20020805034634.GL83171@wantadilla.lemis.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.99i Organization: The FreeBSD Project Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 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 [removing -newbies; they're not a technical list] On Sunday, 4 August 2002 at 20:42:36 -0700, Desmond Lee wrote: > Hi there > > I can't log into my machine because i hosed the /etc/group and the > /etc/master.passwd files while doing an upgrade. > > Anywho, i'm looking at the freebsd faq , 10.14. I have forgotten the root > password! What do I do?, to try and change the root password. But when i do > 'passwd root' i get a message like 'passwd: Unkown user root". Right, that's what you do when you've lost the password. If you've lost the user, you'll have to restore it. You should be able to do it like this: 1. Boot into single user mode. 2. Mount the live file system CD-ROM. 3. Copy the files /etc/group and /etc/master.passwd to their correct place. 4. Run: # pwd_mkdb /etc/master.passwd This will give you a root user with no password. You should obviously fix that as soon as possible. If you don't have the live file system, they're on the installation ISO as well, but that's more work. Greg -- When replying to this message, please copy the original recipients. If you don't, I may ignore the reply. 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