From owner-freebsd-questions@FreeBSD.ORG Sat Oct 4 09:27:19 2003 Return-Path: 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 898B516A4B3 for ; Sat, 4 Oct 2003 09:27:19 -0700 (PDT) Received: from mta4.rcsntx.swbell.net (mta4.rcsntx.swbell.net [151.164.30.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id D38C54400B for ; Sat, 4 Oct 2003 09:27:18 -0700 (PDT) (envelope-from mbsd@pacbell.net) Received: from atlas (adsl-64-165-199-197.dsl.snfc21.pacbell.net [64.165.199.197])h94GRCw5006678; Sat, 4 Oct 2003 11:27:12 -0500 (CDT) Date: Sat, 4 Oct 2003 09:27:11 -0700 (PDT) From: =?ISO-8859-1?Q?Mikko_Ty=F6l=E4j=E4rvi?= X-X-Sender: mikko@atlas.home To: ecrist@adtechintegrated.com In-Reply-To: <200310041045.41800.ecrist@tech-con-inc.com> Message-ID: <20031004092108.G3248@atlas.home> References: <200310041045.41800.ecrist@tech-con-inc.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-questions@freebsd.org Subject: Re: PASSWD file hosed... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2003 16:27:19 -0000 On Sat, 4 Oct 2003, Eric F Crist wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hello, > > I'm sure you're all getting sick of my being so vocal, but here goes anyway. > > I was messing around as root in KDE and found the KUser application. I tried > adding a user (my girlfriend), and when done, nobody could log in. I managed Mmm... GUIs. > to boot into single user, which logged me in a toor. I had to mount the file > systems r/w and finally got my username's password reset, after finding a > bunch of format errors in the /etc/master.passwd file. My problem is that > the was no root user listed, just toor and all the others. How can I change If your machine has been up and running for a while, you will have backup files in /var/backup. Have a look at /var/backups/master.passwd.bak. If it looks contains everything you want, copy it to /etc/master.passwd. Otherwise just edit /etc/master.passwd and add the root entry. The default one without password looks like: root::0:0::0:0:Charlie &:/root:/bin/csh Then run "pwd_mkdb -p /etc/master.passwd" and you're back in business. > this? Also, I've set the console as insecure, so it's going to ask me for a > root password. This is controlled in the file "/etc/ttys". $.02, /Mikko