From owner-freebsd-questions@FreeBSD.ORG Tue Apr 16 11:53:56 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C1485ACE for ; Tue, 16 Apr 2013 11:53:56 +0000 (UTC) (envelope-from jeff.t@mail.com) Received: from mout.gmx.net (mout.gmx.net [74.208.4.200]) by mx1.freebsd.org (Postfix) with ESMTP id 9C3C8630 for ; Tue, 16 Apr 2013 11:53:56 +0000 (UTC) Received: from mailout-us.gmx.com ([172.19.198.45]) by mrigmx.server.lan (mrigmxus001) with ESMTP (Nemesis) id 0Mda8W-1UBcR80HTI-00PJ7j for ; Tue, 16 Apr 2013 13:53:50 +0200 Received: (qmail 23634 invoked by uid 0); 16 Apr 2013 11:53:50 -0000 Received: from 78.84.232.174 by rms-us021 with HTTP Date: Tue, 16 Apr 2013 07:53:47 -0400 From: "Jeff Tipton" Message-ID: <20130416115347.148490@gmx.com> MIME-Version: 1.0 Subject: Re: pwd.db/spwd.db file corupption when having unsafe system poweroff To: freebsd-questions@freebsd.org X-Flags: 0001 X-Mailer: GMX.com Web Mailer x-registered: 0 X-GMX-UID: nF4fcWVb3zOl23uc4XAhu1B+IGRvbwAt Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2013 11:53:56 -0000 Hi, I think if you hold down the power button for several seconds, it's the PSU you are switching off -- directly, without the operating system involved. Or else, it couldn't be the last resort when the OS hangs. As for preventing such things to happen during power outages -- use UPS; it will protect from short power failures. For longer power failures, UPS control and monitoring systems can help you, such as sysutils/nut or sysutils/upsd (also depends on UPS model). They usually have a function of initiating graceful shutdown after user-predefined time of AC failure (you calculate the time depending on how long the batteries endure the load). -Jeff ----- Original Message ----- From: Tak Tak Sent: 04/16/13 12:06 PM To: freebsd-questions@freebsd.org Subject: pwd.db/spwd.db file corupption when having unsafe system poweroff hi everyone, i wanna know what exactly happens for freebsd files and processes, when we shutdown system via pressing hardware power key for 3 seconds? here's what has happened to me, recently: i've faced a strange problem.. on one of my bsd servers, one of my coworkers had defined and edited some system users, and then, instead of safe shutdown, he kept pressing power-button for 3 seconds!.. after next startup, we couldn't login anymore! we had to replace pwd.db and spwd.db files, via bootable-freebsd Fixit mode, and then, everything was fine! we know that we are, for sure, better to use safe shutdown, but i can't guarantee it always happens. what if sudden power off makes same problem??so i can't leave my servers in such situations.. My questins are: what has happened exactly? just in-used corrupted files ?? is there any way to prevent this situation? (instead of having a read-only FS.. i can't apply it on this server for now..). i'm sorry if my question seems dummish! i'm trying to increase my bsd knowledge, but i'm just on my way.. for sure, i appreciate any ideas or answers :) _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"