From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Jun 22 22:50:55 2004 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7CAD516A4CE for ; Tue, 22 Jun 2004 22:50:55 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 61F2F43D45 for ; Tue, 22 Jun 2004 22:50:55 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i5MMoOsh026243 for ; Tue, 22 Jun 2004 22:50:24 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i5MMoOuE026242; Tue, 22 Jun 2004 22:50:24 GMT (envelope-from gnats) Resent-Date: Tue, 22 Jun 2004 22:50:24 GMT Resent-Message-Id: <200406222250.i5MMoOuE026242@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Bud Roth Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 699B116A4CE for ; Tue, 22 Jun 2004 22:48:50 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4C51643D58 for ; Tue, 22 Jun 2004 22:48:50 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.12.11/8.12.11) with ESMTP id i5MMmopk089687 for ; Tue, 22 Jun 2004 22:48:50 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.11/8.12.11/Submit) id i5MMmnUf089686; Tue, 22 Jun 2004 22:48:49 GMT (envelope-from nobody) Message-Id: <200406222248.i5MMmnUf089686@www.freebsd.org> Date: Tue, 22 Jun 2004 22:48:49 GMT From: Bud Roth To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: ports/68213: KDE kuser corrupts passwd file when adding a user X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2004 22:50:55 -0000 >Number: 68213 >Category: ports >Synopsis: KDE kuser corrupts passwd file when adding a user >Confidential: no >Severity: critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Jun 22 22:50:24 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Bud Roth >Release: 5.2.1 Release >Organization: >Environment: FreeBSD barcroft.lake 5.2.1-RELEASE FreeBSD 5.2.1-RELEASE #1: Sun May 30 07:58:11 EDT 2004 root@barcroft.lake:/usr/src/sys/i386/compile/CURKERN i386 >Description: kuser is a program bundled with the KDE desktop port. It adds users to the system. Somehow, when it adds a user, it corrupts either the passwd or master.passwd file. After the program is completed with its task, nobody can log into a TTY or su into a different user or use sudo. PAM reports corrupt files and account passwd change dates have passed. Others have experienced this problem too: http://bsdvault.net/viewtopic.php?topic=1153&forum=2 Hey all, I run FreeBSD 5.1 with KDE 3.1.4. I was just playing around seeing what gui tools came with and I found Kuser. That is a problem. Kuser is bad...they need to fix it. This is what happened: Kuser deleted the first three lines from my /etc/master.passwd file and my /etc/passwd file. Next thing I know I can't su to root because root doesn't exist. Guess what else Kuser did? It set the timeout on my user accounts to December 31, 1969 (or some date in the 1960s). So I couldn't login at all. Well Here is how to fix it. 1. Reboot the computer in Single User Mode (option 4 on boot menu) 2. Once booted you will be promted for your shell, just hit enter. NOTE: Now in single user mode you only have read access 3. Get write access by typing in the following com mands: mount -u / mount -a NOTE: That should give you write access. You should be logged in as toor. 4. copy your /var/backups/master.passwd.bak file to /etc/master.passwd and yes overwrite the old one. 5. Now just run the following command: pwd_mkdb -p /etc/master.passwd That should fix your root account! Thanks, I just wanted to post this somewhere since it took me hours to figure out. Jared Barneck Key words: recover root account - add root account - create root account - fix root account - root login - no such user root >How-To-Repeat: Use kuser to add a user. Then, try to sudo or log in as any user or as root. Nobody's password will work. You are effectively locked out of the system. (In my case, I could ssh into user "bud" because RSA-based authentication by-passed PAM, but I could not su or sudo su into root.) >Fix: Credit to Jared Barneck: 1. Reboot the computer in Single User Mode (option 4 on boot menu) 2. Once booted you will be promted for your shell, just hit enter. NOTE: Now in single user mode you only have read access 3. Get write access by typing in the following com mands: mount -u / mount -a NOTE: That should give you write access. You should be logged in as toor. 4. copy your /var/backups/master.passwd.bak file to /etc/master.passwd and yes overwrite the old one. 5. Now just run the following command: pwd_mkdb -p /etc/master.passwd This fixes the password problems, but does not prevent a repeat of the problem when kuser is used again. >Release-Note: >Audit-Trail: >Unformatted: