Project

General

Profile

Actions

Bug #9659

closed

Failed to remount in single user mode when trying to reset password

Added by Jarry Shaw almost 6 years ago. Updated almost 6 years ago.

Status:
Not a Bug
Priority:
Normal
Assignee:
-
Category:
FreeBSD
Target version:
-
Start date:
07/31/2019
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.4.4
Affected Architecture:
amd64

Description

We were using pfSense CE 2.4.4. Since we accidentally
forgot our console admin password, we followed the instructions on
https://docs.netgate.com/pfsense/en/latest/usermanager/locked-out-of-the-webgui.html
and tried to reset it. But we just cannot remount the
file system writable and therefore had trouble resetting
the password.

We tried the same stuff on two devices. One is a physical
hardware (not by netgate), which we forgot the password.
The other is a VMWare VM installed with pfSense ISO
(pfSense-CE-2.4.4-RELEASE-p3-amd64.iso), which is merely
for testing purpose.

The following descriptions are when we tried after reboot
and entering Single User Mode as the documentation says.


1. On the physical device

When typing the command: /sbin/mount -o rw /, it failed
with the following message:

    # /sbin/mount -o rw /
    mount: /: unknown special file or file system

Then /etc/rc.initial.password failed with error message:
    # /etc/rc.initial.password
    PHP Warning:  PHP Startup: Unable to load dynamic library 'curl.so' (tried: /usr/local/lib/php/20170718/curl.so (Shared object "libnghttp2.so.14" not found, required by "libcurl.so.4"), /usr/local/lib/php/20170718/curl.so.so (Cannot open "/usr/local/lib/php/20170718/curl.so.so")) in Unknown on line 0

    Warning: PHP Startup: Unable to load dynamic library 'curl.so' (tried: /usr/local/lib/php/20170718/curl.so (Shared object "libnghttp2.so.14" not found, required by "libcurl.so.4"), /usr/local/lib/php/20170718/curl.so.so (Cannot open "/usr/local/lib/php/20170718/curl.so.so")) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'pfSense.so' (tried: /usr/local/lib/php/20170718/pfSense.so (Shared object "libvstr-1.0.so.0" not found, required by "libstrongswan.so.0"), /usr/local/lib/php/20170718/pfSense.so.so (Cannot open "/usr/local/lib/php/20170718/pfSense.so.so")) in Unknown on line 0

    Warning: PHP Startup: Unable to load dynamic library 'pfSense.so' (tried: /usr/local/lib/php/20170718/pfSense.so (Shared object "libvstr-1.0.so.0" not found, required by "libstrongswan.so.0"), /usr/local/lib/php/20170718/pfSense.so.so (Cannot open "/usr/local/lib/php/20170718/pfSense.so.so")) in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'rrd.so' (tried: /usr/local/lib/php/20170718/rrd.so (Shared object "libiconv.so.2" not found, required by "libglib-2.0.so.0"), /usr/local/lib/php/20170718/rrd.so.so (Cannot open "/usr/local/lib/php/20170718/rrd.so.so")) in Unknown on line 0

    Warning: PHP Startup: Unable to load dynamic library 'rrd.so' (tried: /usr/local/lib/php/20170718/rrd.so (Shared object "libiconv.so.2" not found, required by "libglib-2.0.so.0"), /usr/local/lib/php/20170718/rrd.so.so (Cannot open "/usr/local/lib/php/20170718/rrd.so.so")) inrandom: unblocking device.
    Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library 'zmq.so' (tried: /usr/local/lib/php/20170718/zmq.so (Shared object "libnorm.so.1" not found, required by "libzmq.so.5"), /usr/local/lib/php/20170718/zmq.so.so (Cannot open "/usr/local/lib/php/20170718/zmq.so.so")) in Unknown on line 0

    Warning: PHP Startup: Unable to load dynamic library 'zmq.so' (tried: /usr/local/lib/php/20170718/zmq.so (Shared object "libnorm.so.1" not found, required by "libzmq.so.5"), /usr/local/lib/php/20170718/zmq.so.so (Cannot open "/usr/local/lib/php/20170718/zmq.so.so")) in Unknown on line 0
    Tue Jul 30 19:13:31 2019 (40): Fatal Error Unable to create lock file: Bad file descriptor (9)

We had yet confirm that the .so dynamic libraries exist:
    # ls -al /usr/local/lib/php/20170718/
    total 4438
    drwxr-xr-x  2 root  wheel       38 Nov 12  2018 .
    drwxr-xr-x  4 root  wheel        4 Nov 12  2018 ..
    -rw-r--r--  1 root  wheel    41624 Sep 14  2018 bcmath.so
    -rw-r--r--  1 root  wheel    21328 Sep 14  2018 bz2.so
    -rw-r--r--  1 root  wheel    15984 Sep 14  2018 ctype.so
    -rw-r--r--  1 root  wheel    86008 Nov  3  2018 curl.so
    -rw-r--r--  1 root  wheel   186504 Sep 14  2018 dom.so
    -rw-r--r--  1 root  wheel    41808 Sep 14  2018 filter.so
    -rw-r--r--  1 root  wheel    13560 Sep 14  2018 gettext.so
    -rw-r--r--  1 root  wheel   259256 Sep 14  2018 hash.so
    -rw-r--r--  1 root  wheel    41832 Sep 14  2018 json.so
    -rw-r--r--  1 root  wheel    67280 Sep 14  2018 ldap.so
    -rw-r--r--  1 root  wheel  1067392 Sep 14  2018 mbstring.so
    -rw-r--r--  1 root  wheel    39800 Sep 14  2018 mcrypt.so
    -rw-r--r--  1 root  wheel   461112 Sep 14  2018 opcache.so
    -rw-r--r--  1 root  wheel   182080 Sep 14  2018 openssl.so
    -rw-r--r--  1 root  wheel    34056 Sep 14  2018 pcntl.so
    -rw-r--r--  1 root  wheel   105832 Sep 14  2018 pdo.so
    -rw-r--r--  1 root  wheel    25840 Sep 14  2018 pdo_sqlite.so
    -rw-r--r--  1 root  wheel   114768 Nov  6  2018 pfSense.so
    -rw-r--r--  1 root  wheel    34672 Sep 14  2018 posix.so
    -rw-r--r--  1 root  wheel    49360 Sep 14  2018 radius.so
    -rw-r--r--  1 root  wheel    29184 Sep 14  2018 readline.so
    -rw-r--r--  1 root  wheel    34096 Sep 14  2018 rrd.so
    -rw-r--r--  1 root  wheel    91600 Sep 14  2018 session.so
    -rw-r--r--  1 root  wheel    11784 Sep 14  2018 shmop.so
    -rw-r--r--  1 root  wheel    59224 Sep 14  2018 simplexml.so
    -rw-r--r--  1 root  wheel    87488 Sep 14  2018 sockets.so
    -rw-r--r--  1 root  wheel    46128 Sep 14  2018 sqlite3.so
    -rw-r--r--  1 root  wheel    16264 Sep 14  2018 sysvmsg.so
    -rw-r--r--  1 root  wheel     9120 Sep 14  2018 sysvsem.so
    -rw-r--r--  1 root  wheel    12024 Sep 14  2018 sysvshm.so
    -rw-r--r--  1 root  wheel    20752 Sep 14  2018 tokenizer.so
    -rw-r--r--  1 root  wheel    50784 Sep 14  2018 xml.so
    -rw-r--r--  1 root  wheel    34176 Sep 14  2018 xmlreader.so
    -rw-r--r--  1 root  wheel    45208 Sep 14  2018 xmlwriter.so
    -rw-r--r--  1 root  wheel    45760 Sep 14  2018 zlib.so
    -rw-r--r--  1 root  wheel    82464 Sep 14  2018 zmq.so

2. On the VM

/sbin/mount -o rw / returns with zero. And then we typed
/etc/rc.initial.password, and this is the error message:

    # /etc/rc.initial.password
    Wed Jul 31 09:33:26 2019 (42): Fatal Error Unable to create lock file: Bad file descriptor (9)


As for /sbin/mount -a -t ufs, it returns with zero but
nothing changed on both devices. The file system is still
read-only.

We will attach the console output of the physical device.


Files

ORCOM.txt (27.9 KB) ORCOM.txt Jarry Shaw, 07/31/2019 02:28 AM
Actions

Also available in: Atom PDF