From owner-freebsd-questions@FreeBSD.ORG Thu Sep 30 14:25:24 2004 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 D322716A4CE for ; Thu, 30 Sep 2004 14:25:24 +0000 (GMT) Received: from acidy.com (iade006wl01.blackmesh.com [216.66.28.50]) by mx1.FreeBSD.org (Postfix) with SMTP id 5179643D45 for ; Thu, 30 Sep 2004 14:25:22 +0000 (GMT) (envelope-from steve@acidy.com) Received: (qmail 14523 invoked by uid 512); 30 Sep 2004 14:25:21 -0000 Received: from steve@acidy.com by terrence by uid 510 with qmail-scanner-1.21st (clamdscan: 0.70rc. spamassassin: 2.63. Clear:RC:1(212.44.26.32):. Processed in 0.850836 secs); 30 Sep 2004 14:25:21 -0000 Received: from unknown (HELO apollo.howes-macnaghten.com) (212.44.26.32) by acidy.com with SMTP; 30 Sep 2004 14:25:20 -0000 Received: from steve ([192.168.42.70]) by apollo.howes-macnaghten.com with Microsoft SMTPSVC(5.0.2195.6713); Thu, 30 Sep 2004 15:25:20 +0100 From: "Steve Hodgson" To: =?iso-8859-1?Q?'Gr=E9gory_Nou'?= , Date: Thu, 30 Sep 2004 15:25:20 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6626 In-Reply-To: <415C0DC0.1030807@altern.org> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Importance: Normal X-OriginalArrivalTime: 30 Sep 2004 14:25:20.0159 (UTC) FILETIME=[508B4AF0:01C4A6F9] Subject: RE: a very annoying pb with accounts 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: Thu, 30 Sep 2004 14:25:24 -0000 owner-freebsd-questions@freebsd.org wrote: > Hi everybody, > > Here is my (weird) problem ... > I opened /etc/spwd.db with ee and exited (which was actually > a very bad > idea, even if I did not modified anything). At this time, everything > was still ok. > Then, a few minutes later, I tried to su ... Impossible : I get some > weird error message telling me "su: who are you ?" > Then I tried to log directly from the login shell on tty0 with my > account... unknown user. I add a look at /etc/passwd : everything was > correct. > And when I tried to recreate my account : "user already > exists" Then I reboot (the second very bad idea in the same > day), and user "gdm" > didn't exist anymore. > Exactly as if I forgot to make mergemaster after upgrading, but with > only one difference : I actually didn't made a upgrade. > So now the situation is : I can only access with root > account. Does someone know when I did a mistake ? and does > someone knows how to > fix it ? Should I delete account in /etc/passwd and create > them again ? > I had this idea, but I didn't want to make another stupid > thing today :) Thanks a lot I can only guess that you need to use pwd_mkdb. Probably the easiest way to do this is to use /sbin/vipw, just doing ":wq" to save the changes (though there will be none), which will run pwd_mkdb for you. Steve