I absolutely have no idea.

Ok, I messed something up. I have lost my user home directory (/home/larry) and my root password. I reset the root password but I've lost so many settings, mainly from my home directory. I would have thought I had just accidentally erased my home directory but for the root password being gone as well. It happened on the 25th. At some point I was getting "who are you?" when trying to su or some similar action. I was going to try and fix it before a restart (or backup) but a house-wide power outage overruled me. I had been trying to do several things near then. I had destroyed the swap directory. I only installed it because xmonad would not install without it. I had using make buildworld. I suppose, I might have started installworld on the wrong directory then stopped it (I don't remember). I also destroyed an unused beadm snapshot but it was one I had tried and then reverted back to the older one (it was not active). Anyway, all the programs seem to still be there, even the installs done a couple of days ago. If anybody has any clues what happened or if/how I can recover without a complete reinstall please let me know.

From root daily run output ( passwd diffs is very long)
Code:
Removing stale files from /var/preserve:

Cleaning out old system announcements:

Removing stale files from /var/rwho:

Backup passwd and group files:
freebsd.webbrews.com passwd diffs:
3c3
< root:(password):0:0::0:0:Charlie &:/root:/usr/local/bin/zsh
---
> root:(password):0:0::0:0:Charlie &:/root:/bin/csh
27,35d26
< larry:(password):1001:0::0:0:User &:/home/larry:/usr/local/bin/zsh
< messagebus:(password):556:556::0:0:D-BUS Daemon User:/nonexistent:/usr/sbin/nologin
< polkit:(password):562:562::0:0:PolicyKit User:/nonexistent:/usr/sbin/nologin
< haldaemon:(password):560:560::0:0:HAL Daemon User:/nonexistent:/usr/sbin/nologin
< avahi:(password):558:558::0:0:Avahi Daemon User:/nonexistent:/usr/sbin/nologin
< colord:(password):970:970::0:0:colord color management daemon:/nonexistent:/usr/sbin/nologin
< pulse:(password):563:563::0:0:PulseAudio System User:/nonexistent:/usr/sbin/nologin
< git_daemon:(password):964:964::0:0:git daemon:/nonexistent:/usr/sbin/nologin
< saned:(password):194:194::0:0:SANE Scanner Daemon:/nonexistent:/bin/sh
freebsd.webbrews.com group diffs:
34,43d33
< messagebus:*:556:
< polkit:*:562:
< haldaemon:*:560:
< avahi:*:558:
< colord:*:970:
< pulse:*:563:
< pulse-access:*:564:
< pulse-rt:*:557:
< git_daemon:*:964:
< saned:*:194:

setup
Code:
$ zfs list
NAME                 USED  AVAIL  REFER  MOUNTPOINT
local                221M  39.7G    31K  none
local/home          42.1M  39.7G  42.1M  /home
local/jails          179M  39.7G    32K  /jails
local/jails/fbsd     179M  39.7G   179M  /jails/fbsd
sys                 11.8G  3.85G    31K  none
sys/ROOT            11.8G  3.85G    31K  none
sys/ROOT/configure  11.8G  3.85G  8.30G  legacy
sys/ROOT/default     128K  3.85G  1016M  legacy
$ zpool list
NAME    SIZE  ALLOC   FREE    CAP  DEDUP  HEALTH  ALTROOT
local  40.5G   221M  40.3G     0%  1.00x  ONLINE  -
sys    15.9G  11.8G  4.10G    74%  1.00x  ONLINE  -
$ beadm list
BE        Active Mountpoint  Space Created
default   -      -          628.0K 2014-03-03 21:25
configure NR     /           11.8G 2014-03-04 08:28
$ zfs list -t snapshot
NAME                                     USED  AVAIL  REFER  MOUNTPOINT
local/jails/fbsd@10.0                     83K      -   179M  -
sys@save                                    0      -    31K  -
sys/ROOT@save                               0      -    31K  -
sys/ROOT/configure@install                  0      -   931M  -
sys/ROOT/configure@2014-03-03-22:34:49      0      -   931M  -
sys/ROOT/configure@2014-03-04-08:28:07   500K      -  1016M  -
sys/ROOT/configure@2014-04-04-19:18:49   260K      -  8.86G  -
sys/ROOT/configure@save                  296K      -  8.86G  -
sys/ROOT/default@save                       0      -  1016M  -
$ uname -a
FreeBSD freebsd.webbrews.com 10.0-RELEASE-p1 FreeBSD 10.0-RELEASE-p1 #0: Tue Apr  8 06:45:06 UTC 2014     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

I know I need to automate snapshots and take them regularly; that is why I created a jail to play with it and get a better understanding. Too late I guess :(
 
Re: I absolutly have know idea.

sysinfo
Code:
root@freebsd:~ # sysinfo -a
Generated by SysInfo v1.0.1 by Daniel Gerzo

System information

Manufacturer: HP-Pavilion
Product Name: FQ565AA-ABA a6700f

INFO: Run `dmidecode -t system` to see further information.

Base board information
Manufacturer: ECS 
Product Name: Nettle3

INFO: Run `dmidecode -t baseboard` to see further information.

Graphic card information:
vendor='NVIDIA Corporation'
device='GK107 [GeForce GT 640]'
INFO: Check pciconf(8) for more information.

PCI devices with no driver attached:
none0@pci0:0:0:0:	class=0x050000 card=0x2a6d103c chip=0x03ea10de rev=0xa1 hdr=0x00
none1@pci0:0:1:1:	class=0x0c0500 card=0x2a6d103c chip=0x03eb10de rev=0xa2 hdr=0x00
none2@pci0:0:1:2:	class=0x050000 card=0x2a6d103c chip=0x03f510de rev=0xa2 hdr=0x00
none3@pci0:1:9:0:	class=0x0c0010 card=0x2a6d103c chip=0x30441106 rev=0x80 hdr=0x00

BIOS information

Vendor: Phoenix Technologies, LTD
Version: 5.28 
Release Date: 12/18/2008
BIOS Revision: 0.1

INFO: Run `dmidecode -t bios` to see further information.

CPU information

Machine class:	amd64
CPU Model:	AMD Phenom(tm) 9150e Quad-Core Processor
No. of Cores:	4
Cores per CPU:	

CPU usage statistics:
CPU:  0.1% user,  0.0% nice,  0.2% system,  0.0% interrupt, 99.7% idle

RAM information

Memory information from dmidecode(8)
Maximum Memory Module Size: 4096 MB
Maximum Total Memory Size: 16384 MB
Maximum Capacity: 8 GB
Number Of Devices: 4

INFO: Run `dmidecode -t memory` to see further information.

System memory summary
Total real memory available:	4054 MB
Logically used memory:		2695 MB
Logically available memory:	1358 MB

Swap information
Device          1K-blocks     Used    Avail Capacity

Operating system information

Operating system release:	FreeBSD 10.0-RELEASE-p1
OS architecture:		amd64
Hostname:			freebsd.webbrews.com
Kernel build dir location:	/usr/obj/usr/src/sys/GENERIC
Currently booted kernel:	/boot/kernel/kernel

Currently loaded kernel modules (kldstat(8)):
zfs.ko
opensolaris.ko
linux.ko
aio.ko
nvidia.ko
sem.ko
ums.ko
if_rum.ko
WARNING: The ums.ko module is loaded, however it is not being loaded upon the system boot time from /boot/loader.conf.
WARNING: The if_rum.ko module is loaded, however it is not being loaded upon the system boot time from /boot/loader.conf.

INFO: For security recommendations see the security(7) man page.
INFO: For system tuning advice, see the tuning(7) man page.
INFO: To view various system statistics use the systat(1) tool.

Bootloader settings
The /boot/loader.conf has the following contents:
zfs_load=YES
aio_load=YES
nvidia_load=YES
opensolaris_load=YES
linux_load=YES
sem_load=YES
ukbd_load=YES
machdep.disable_mtrrs=1
INFO: See the loader.conf(5) manual page for more information.

System uptime:
System is up since Fri Apr 25 21:15:47 2014
 4:44PM  up 1 day, 19:29, 4 users, load averages: 0.19, 0.25, 0.24

Process statistics:
53 processes:  1 running, 52 sleeping

Jail related information:
   JID  IP Address      Hostname                      Path

Storage information

Available hard drives:
da3: <Generic- MS/MS-Pro 1.00> Removable Direct Access SCSI-0 device 
da3: Serial Number 20021111153705700
da3: 40.000MB/s transfers
da3: quirks=0x2<NO_6_BYTE>
da2: <Generic- SD/MMC 1.00> Removable Direct Access SCSI-0 device 
da2: Serial Number 20021111153705700
da2: 40.000MB/s transfers
da2: quirks=0x2<NO_6_BYTE>
da1: <Generic- SM/xD-Picture 1.00> Removable Direct Access SCSI-0 device 
da1: Serial Number 20021111153705700
da1: 40.000MB/s transfers
da1: quirks=0x2<NO_6_BYTE>
da0: <Generic- Compact Flash 1.00> Removable Direct Access SCSI-0 device 
da0: Serial Number 20021111153705700
da0: 40.000MB/s transfers
da0: quirks=0x2<NO_6_BYTE>
cd0: <ATAPI DVD A  DH16A6L-C ZHCG> Removable CD-ROM SCSI-0 device 
cd0: Serial Number 349909400419
cd0: 150.000MB/s transfers (SATA 1.x, UDMA5, ATAPI 12bytes, PIO 8192bytes)
ada0: <SAMSUNG MMCRE64G8MXP-0VB VBM1801Q> ATA-7 SATA 2.x device
ada0: Serial Number YCB620S935SY935B0676
ada0: 300.000MB/s transfers (SATA 2.x, UDMA5, PIO 8192bytes)
ada0: 61057MB (125045424 512 byte sectors: 16H 63S/T 16383C)
ada0: Previously was known as ad4

Raid controllers:
umass-sim0:

Currently mounted filesystems:
sys/ROOT/configure on /
devfs on /dev
local/home on /home
local/jails on /jails
local/jails/fbsd on /jails/fbsd
10.0.0.22:/Multimedia on /media/nas

WARNING: Not found in fstab(5): sys/ROOT/configure on /
WARNING: Not found in fstab(5): local/home on /home
WARNING: Not found in fstab(5): local/jails on /jails
WARNING: Not found in fstab(5): local/jails/fbsd on /jails/fbsd


I/O statistics:
       tty            ada0              da0              da1             cpu
 tin  tout  KB/t tps  MB/s   KB/t tps  MB/s   KB/t tps  MB/s  us ni sy in id
  25   100  2.33   7  0.02   0.00   0  0.00   0.00   0  0.00   1  0  0  0 99
INFO: Run iostat(8) or gstat(8) to see live statistics.

Disk usage:
Filesystem               Size    Used   Avail Capacity  Mounted on
sys/ROOT/configure        12G    8.3G    3.8G    68%    /
devfs                    1.0K    1.0K      0B   100%    /dev
local/home                40G     42M     40G     0%    /home
local/jails               40G     32K     40G     0%    /jails
local/jails/fbsd          40G    179M     40G     0%    /jails/fbsd
10.0.0.22:/Multimedia    1.8T    1.8T    3.3G   100%    /media/nas

Network information

hostname: freebsd.webbrews.com

Currently available network devices:
re0 nfe0 lo0 rum0

Basic configuration for currently available NICs:

re0 (): status: active
MAC address: 
00:22:3f:e9:45:b2
IPv4 addresses:
10.0.0.20 netmask 0xffffff00
IPv6 addresses:
fe80::222:3fff:fee9:45b2%re0 prefixlen 64

Input errors: 0
Output errors: 1696839
Collisions: 377976369

nfe0: status: no
MAC address: 
00:21:97:c4:c4:1b
No IP addresses are associated to this NIC.

Input errors: 0
Output errors: 0
Collisions: 0

lo0 (): 
IPv4 addresses:
127.0.0.1 netmask 0xff000000
IPv6 addresses:
::1 prefixlen 128
fe80::1%lo0 prefixlen 64

Input errors: 0
Output errors: 0
Collisions: 0

rum0: status: no
MAC address: 
00:22:5f:6f:39:ed
No IP addresses are associated to this NIC.

Input errors: 0
Output errors: 0
Collisions: 0

INFO: Check ifconfig(8) for more information.

Default route:
10.0.0.1 via re0
INFO: For a complete routing table please run netstat -rn.

Firewall related information:
WARNING: inetd(8) is enabled, however none of its services are enabled. Check /etc/inetd.conf.
There are 15 rules in /etc/hosts.allow (-rw-r--r--) which affect inetd(8) operation and services linked against libwrap.
INFO: Check the hosts_options(5) manual page for more information.


WARNING: No firewall is being used on this system.
INFO: There are several firewall packages on FreeBSD.
INFO: You may want to check http://www.freebsd.org/doc/en/books/handbook/firewalls.html.

Resolver name servers:
8.8.8.8
4.4.4.4

Socket statistics:
There are currently 20 listening (10 TCP/10 UDP) and 4 established connections.
INFO: For more information please see sockstat(8) manual.

User related information

There are 2 local users (uid > 1000) and 21 system users (uid < 1000).

There are 2 local groups (gid > 1000) and 27 system groups (gid < 1000).

Users in wheel group (allowed to use su(1)):
root,toor,root


Packages information

/usr/local/share/sysinfo/modules/packages: pkg_info: not found
/usr/local/share/sysinfo/modules/packages: pkg_version: not found
There are 0 packages installed in the system and 0 of them needs updating.
Note that this number may be inaccurate, as your ports tree may be outdated too.

INFO: Run pkg_info(1) to see a full list of installed packages.
INFO: Use pkg_version(1) to inspect what packages are outdated.
INFO: Use the portsnap(8) or csup(1) tool to update your ports tree.

WARNING: You should install the portaudit(1) tool in order to get information about known security vulnerabilities in your packages.

Information related to services

WARNING: dbus is supposed to be running, but it isn't.
WARNING: hald is supposed to be running, but it isn't.
WARNING: amd is supposed to be running, but it isn't.
WARNING: cleanvar is supposed to be running, but it isn't.
WARNING: cron is supposed to be running, but it isn't.
WARNING: devd is supposed to be running, but it isn't.
WARNING: dmesg is supposed to be running, but it isn't.
WARNING: gptboot is supposed to be running, but it isn't.
WARNING: hostid is supposed to be running, but it isn't.
kenv: unable to get dhcp.host-name
WARNING: lpd is supposed to be running, but it isn't.
WARNING: mixer is supposed to be running, but it isn't.
WARNING: ntpdate is supposed to be running, but it isn't.
WARNING: powerd is supposed to be running, but it isn't.
WARNING: sshd is supposed to be running, but it isn't.
WARNING: syslogd is supposed to be running, but it isn't.
WARNING: virecover is supposed to be running, but it isn't.
WARNING: zfs is supposed to be running, but it isn't.

Running services


Not running services

abi is not running.
addswap is not running.
adjkerntz is not running.
amd is not running.
apache22 is not running.
archdep is not running.
background-fsck is not running.
bluetooth is not running.
bridge is not running.
calibre is not running.
ccd is not running.
cleanvar is not running.
cleartmp is not running.
cron is not running.
dbus is not running.
defaultroute is not running.
devd is not running.
devfs is not running.
dmesg is not running.
dumpon is not running.
faith is not running.
ffserver is not running.
fsck is not running.
gbde is not running.
geli is not running.
geli2 is not running.
git_daemon is not running.
gptboot is not running.
hald is not running.
hostid is not running.
hostid_save is not running.
hostname is not running.
htcacheclean is not running.
initrandom is not running.
kld is not running.
ldconfig is not running.
lircd is not running.
local is not running.
localpkg is not running.
lpd is not running.
mdconfig is not running.
mdconfig2 is not running.
mixer is not running.
motd is not running.
mountcritlocal is not running.
mountcritremote is not running.
mountlate is not running.
network is not running.
nfsclient is not running.
nisdomain is not running.
nsswitch is not running.
ntpdate is not running.
postrandom is not running.
powerd is not running.
pwcheck is not running.
random is not running.
rctl is not running.
root is not running.
routing is not running.
saned is not running.
savecore is not running.
socat is not running.
sppp is not running.
sshd is not running.
static_arp is not running.
static_ndp is not running.
stf is not running.
svnserve is not running.
swap is not running.
swaplate is not running.
syscons is not running.
sysctl is not running.
syslogd is not running.
utx is not running.
virecover is not running.
zfs is not running.
zvol is not running.

INFO: Configuration of system-wide services is located in the /etc/ directory.
INFO: Configuration of 3rd party services can be found in the /usr/local/etc/ directory.

Misc information

Open file statistics (cur/max):
287/129753 files

Resource limits:
Resource limits (current):
  cputime              infinity secs
  filesize             infinity kB
  datasize             33554432 kB
  stacksize              524288 kB
  coredumpsize         infinity kB
  memoryuse            infinity kB
  memorylocked         infinity kB
  maxprocesses             8499
  openfiles              116775
  sbsize               infinity bytes
  vmemoryuse           infinity kB
  pseudo-terminals     infinity
  swapuse              infinity kB

Information related to cron:
There are 7 entries in /etc/crontab

Current time and date:
Sun Apr 27 16:44:27 CDT 2014
 
Re: I absolutly have know idea.

I'm going to guess you did a make distribution and that installs a default password database. It wouldn't explain the missing home directory contents though, so it's even more likely that something/someone executed pw userdel -r, but that doesn't explain all the other users missing. From the looks of it, you got handed a default password database and all home directories of non-existing users were deleted.
 
Re: I absolutly have o idea.

wblock@ said:
Ran mergemaster(8) without paying attention? It will happily write a default /etc/passwd over the real thing.

I was about to suggest the same but you were a tad quicker :r One rather important point though, /etc/passwd is always a generated file. The password utilities and also mergemaster(8) deal only with the /etc/master.passwd file and /etc/passwd gets synchronized from the changed /etc/master.passwd when needed.
 
Re: I absolutly have o idea.

Still doesn't explain the pw userdel -r or is that a new mergemaster feature I'm not aware of?
 
Re: I absolutly have o idea.

Melvyn said:
Still doesn't explain the pw userdel -r or is that a new mergemaster feature I'm not aware of?

Absolutely not. It will offer a merge for the password database when there are changes that it detects but it doesn't delete user accounts on its own. And who said that someone has actually done a pw userdel -r in this case? So far only you.
 
Re: I absolutly have o idea.

Thanks for all the replies. I really appreciate it.

I haven't run mergemaster or pw userdel -r directly. I can't say I haven't run a script with them, without knowing. Unfortunately, I'm the only user (no one else to blame).
 
Re: I absolutly have o idea.

kpa said:
Melvyn said:
Still doesn't explain the pw userdel -r or is that a new mergemaster feature I'm not aware of?
And who said that someone has actually done a pw userdel -r in this case? So far only you.

I offered that as a possible for the "I have lost my home directory" sentence in the original post.
 
Back
Top