所有用户已锁定 - 无法登录

所有用户已锁定 - 无法登录

附件中您可以找到我的 homebridge 帐户的终端。唯一真正能够登录的帐户是:

homebridge@raspberrypi:/var/lib/homebridge
$ su pi su: Authentication failure
homebridge@raspberrypi:/var/lib/homebridge
§ su pi su: Authentication failure
homebridge@raspberrypi:/var/lib/homebridge
§ sudo su
sudo: account validation failure, is your account locked?
homebridge@raspberrypi:/var/lib/homebridge
$

有人知道如何解决这个问题吗?当我尝试更新系统时,重新启动后就会发生这种情况。

更新日期:2023 年 7 月 4 日(MM/DD/YYYY):我越来越接近了,看来升级导致了很多损失:

You might want to run 'apt -fix-broken install' to correct these.
The following packages have unmet dependencies:
binutils-arm-linux-gnueabihf: Depends: libctf-nobfdo (>= 2.36) but it is not installed
Depends: libctf0 (›= 2.36) but it is not installed
Depends: libjansson4 (>= 2.14) but it is not installed
Depends: libzstd1 (>= 1.5.2) but 1.3.8+dfsg-3+rpi1+deb10u2 is installed
g** : Depends: cpp. (= 4:12.2.0-3) but 4:8.3.0-1+rpi2 is installed
Depends: g++-12 (>= 12.2.0-1*) but it is not installed
Depends: gcc-12 (>= 12.2.0-1') but it is not installed gcc: Depends: cpp (= 4:12.2.0-3) but 4:8.3.0-1+rpi2 is installed
Depends: gcc-12 (>= 12.2.0-1') but it is not installed libbinutils : Depends: libzsta1 (>= 1.5.2) but 1.3.8+dfsg-3+rpil+deb10u2 is installed libc-dev-bin : Depends: libc6 (< 2.29) but 2.36-9 is installed libc6-dev : Depends: libc6 (= 2.28-10+rpt2+rpi1+deb10u2) but 2.36-9 is installed libstdc++-B-deu : Depends: libgcc-8-deu (= 8.3.0-6+rpil) but it is not installed locales: Depends: libc-110m (> 2.36) but 2.28-10+rpt2+rpi1+deb10u2 is installed python3: Depends: python3.11 (›= 3.11.2-1*) but it is not installed
Depends: libpython3-stalib (= 3.11.2-1+b1) but 3.7.3-1 is installed
python3-apt: Depends: libapt-pkg6.0 (>= 1.9.11°) but it is not installed
Depends: libstdc*+6 (>= 11) but 8.3.0-6+rpi1 is installed
python3-dev : Depends: libpython3-dev (= 3.11.2-1+b1) but 3.7.3-1 is installed
Depends: python3.11-dev (›= 3.11.2-1") but it is not installed
Depends: lib js-sphinxdoc (›= 5.2) but 1.8.4-1 is installed
python3-yaml: Depends: libyam]-0-2 (>= 0.2.2*) but 0.2.1-1 is installed
E: Unmet dependencies. Try 'apt - fix-broken install' with no packages (or specify a solution). roote (none) : /var/lib/dpkg/alternatives#

但也存在以下问题:

roote (none): /var/lib/dpkg/alternatives# apt
--Lix-brokeninstal
Reading package lists...
Building dependency tree
heading State information... Done Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
cpp-8 dh-python libasan5 libis119 libpython3.7-deu python3.7-mininal telnet
Use
ant autorenoue
to renove them.
The following additional packages will be installed:
apt apt-utils cpp cpp-le dpkg g**- l2 gcc- 12 libabs 120220623 libaon3 libapt-pkg6.0 libasan8 libatonic1 libauif15 libc-deu-bin libc-deutools libc-110n libc6-deu libcc1-0 libcrypt-deu libetf-nobfd0 libetf0 libdau1d6 libde265-0
libdeflate0 libffi8 libgau1-1
libgec-12-deu Libgerupt20 Libgd3 libgmp10 iibgnutIs30 libgompi libheiri iibhogueed6 libis123 11b jansson4 11bjs-sphinxdoc l1blerc4
1 libizna5 libndO libnettle8 libns1-deu libns12 libp11-kito
lipython3-deu libpython3-stdlib libpython3.11 libpython3.11-deu libpython3.11-stälib libraule0 libreadline8 libseccomp2 libsqlite3-0 libsqlite3-deu libstdc**-12-deu libstdc*+6 libsutaulenc1 libtasn1-6 libtiff6
libtirpe-common libtirpe-deu libtirpe§ libubsant libuebp? libx265-199 libxxhasho libyani-0-2 libyuue Tibzstál nanpages nanpages-deu python3. 11 python3.11-deu rpcsuc-proto
Suggested packages:
apt-doc aptitude I synaptic I wajig pouerngnt-base cpp-doc gcc-12- locales cpp-12-doc debsig-verify gcc-12-doc glibc-doc libgd-tools gnutls-bin sqlite3-doc libstdc**-12-doc python3. 11-venu python3.11-doc
The following packages wiil be REMOUED:
libstdc*+-8-deu python3.7
The
following NEW packages will be installed:
cpp-12 g *+-12 gcc-12 libabs120220623 libaon3 libapt-pkg6.0 libasan8 libauif15 libc-deutools liberypt-deu libetf-nobfd0 libetf0 libdau1d6 libde265-0 libdeflate0 libffi8 libgau1-1 libgcc-12-deu libgd3 libheif1 libhogueed6
libis123 libjansson4 liblerc4 libmdo libnettle8 libns1-deu libns12 libpython3.11 libpython3.11-deu libpython3.11-stdlib libraule0 libreadline8 libstdc*+-12-deu libsutaulenc1 libtiff6 libtirpc-deu libuebp? 11bx265-199 libxxhasho libyuuO python3.11 python3.11-deu rpcsuc-proto
The following packages will be upgraded:
apt apt-utils opp dpkg libatonic1 libc-deu-bin libc-110m libe6-deu libec1-0 libgcrypt20 libgmp10 libgnutIs30 libgomp1 libjs-sphinxdoc liblzma5 libp11-kit0 Libpython3-deu libpython3-stdlib 11bseccomp? libsqlite3-0 libsqlite3-deu libstdc*+6 libtasn1-6 libtirpc-connon libtirpc3 libubsan1 libyanI-0-2 libzstd1 nanpages nanpages-deu
30 upgraded, 44 neuly installed, 2 to renove and 570 not upgraded.
24 not fully installed or renoued.
Need to get 0 B/66.3 MB of archives.
this operation, 145 MB of additional disk space will be used.
Do you want to continue? EY/n] y Traceback (nost recent call last):
File
"'usr/bin/apt-listchanges", line 30, in <nodule> import apt_pky
ImportError: libapt-pky.so.6.0: cannot open shared object file: No such file or directory debconf: delaying package configuration, since apt-utils is not installed
Es can not write
log (Is /devrpts mounted?) - posix openpt (2:
No such file or directory)
Setting up libpan@g :arnhf (1.5.2-6)
Checking
for
services
that mau need to
be restarted../var/lib/dpkg/info/libpan@g:armhf.postinst: 146: /uar/lib/dpkg/info/l
Checking init scripts.
wk: not found
war/lib/@pkg/info/libpan0g;arnhf.postinst:97:/uar/Lib/dpkg/info/libpan@g:arnhf-postinst:auk:notfound dpkg; error.
processing package libpan@g :armhf (-configure):
installed libpan@g :arnhf package post-installation script subprocess returned error exit status
Errors were encountered while processing:
libpan0g: arnhf
ncedrestart is being skipped since dpky has failed
E: Sub-process rusr/bin/dpkg returned an error code
roote (none):/var/lib/dpkg/alternatives#

答案1

我可以通过执行以下操作来解决登录问题:

通过附加以下内容更改了 cmdline.txt:

init=/bin/bash

我使用以下命令将 / 加载为 rw:

mount -o remount,rw /
mount -o remount, rw /
mount -o remount,  —-rw /
mount -all

之后,我通过删除密码哈希值从影子文件中删除了密码 - 只是为了确保我可以不用密码登录

我还创建了一个新用户并释放了所有用户,以确保没有用户被锁定。

然后我跑apt --fix-broken install -y -f&apt-get Update && apt-get install -y -f

现在我遇到了几个问题,但不再与用户登录部分相关。

答案2

尝试 sudo su - ,然后尝试 root 密码。

或者 su - pi ,然后是 pi 用户的密码。

以 root 身份你可以检查用户当前年龄:chage -l 用户名

相关内容