pwd.db/spwd.db file corupption when having unsafe system poweroff
jeff.t at mail.com
Tue Apr 16 11:53:56 UTC 2013
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).
----- Original Message -----
From: Tak Tak
Sent: 04/16/13 12:06 PM
To: freebsd-questions at 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 at freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
More information about the freebsd-questions