Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Apr 2013 13:36:42 +0430
From:      Tak Tak <tak.official@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   pwd.db/spwd.db file corupption when having unsafe system poweroff
Message-ID:  <CAHHq%2BVwcazbVXDDsZqH1AXxVOu0mfGjT_5Tcj3OoHJroe8Kgdg@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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 :)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAHHq%2BVwcazbVXDDsZqH1AXxVOu0mfGjT_5Tcj3OoHJroe8Kgdg>