升级到 18.04 后,PAM 无法 dlopen(pam_systemd.so)

升级到 18.04 后,PAM 无法 dlopen(pam_systemd.so)

我有一个旧的 Web 服务器,需要从 14.04 升级到 18.04。我从 14.04 升级到 16.04,然后又从 16.04 升级到 18.04。它位于代理后面,在该代理上,我看到了connect() failed (111: Connection refused) while connecting to upstream

在后端服务器上,/var/log/auth.log我看到:

PAM unable to dlopen(pam_unix.so): /lib/security/pam_unix.so: cannot open shared object file: No such file or directory
PAM adding faulty module: pam_unix.so
PAM unable to dlopen(pam_ecryptfs.so): /lib/x86_64-linux-gnu/librt.so.1: symbol __close_nocancel, version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference
PAM adding faulty module: pam_ecryptfs.so
PAM unable to dlopen(pam_systemd.so): /lib/security/pam_systemd.so: cannot open shared object file: No such file or directory
PAM adding faulty module: pam_systemd.so

我有另一台服务器,其用途与代理后端相同,它是全新安装的 Ubuntu 18.04。该/lib/security目录甚至不存在于该服务器上,但它存在于问题服务器上。

/lib工作服务器上的目录内容:

-rwxr-xr-x  1 root root 74656 Nov  9  2017 klibc-wBFLvVtxy4xJqEadIBJMa78iJz8.so
drwxr-xr-x 15 root root  4096 Feb 12  2018 terminfo
-rw-r--r--  1 root root 14416 Apr 18  2018 libhandle.so.1.0.3
lrwxrwxrwx  1 root root    18 Apr 18  2018 libhandle.so.1 -> libhandle.so.1.0.3
drwxr-xr-x  3 root root  4096 Feb 14  2019 lsb
drwxr-xr-x  2 root root  4096 Feb 14  2019 init
drwxr-xr-x  2 root root  4096 Feb 14  2019 console-setup
drwxr-xr-x  2 root root  4096 Feb 14  2019 netplan
drwxr-xr-x  2 root root  4096 Feb 14  2019 open-iscsi
drwxr-xr-x  2 root root  4096 Feb 14  2019 modules-load.d
drwxr-xr-x  2 root root  4096 Feb 14  2019 apparmor
drwxr-xr-x  3 root root  4096 Feb 14  2019 recovery-mode
drwxr-xr-x  2 root root  4096 Feb 14  2019 hdparm
drwxr-xr-x  2 root root  4096 Feb 14  2019 ufw
drwxr-xr-x  4 root root  4096 Feb 14  2019 cryptsetup
drwxr-xr-x  2 root root  4096 Feb 14  2019 ebtables
drwxr-xr-x  2 root root  4096 Aug 17  2020 resolvconf
lrwxrwxrwx  1 root root    21 Aug 17  2020 cpp -> /etc/alternatives/cpp
drwxr-xr-x  8 root root 12288 Sep 16  2020 systemd
drwxr-xr-x 84 root root 20480 Dec 11 06:48 firmware
drwxr-xr-x  3 root root  4096 Dec 11 06:48 crda
drwxr-xr-x  4 root root  4096 Feb 10 06:15 udev
drwxr-xr-x  4 root root 16384 Feb 19 06:35 x86_64-linux-gnu
drwxr-xr-x 20 root root  4096 Apr 16 06:30 modules
drwxr-xr-x  2 root root  4096 Apr 17 06:51 modprobe.d

/lib故障服务器上的内容:

drwxr-xr-x 15 root root  4096 Mar  1  2011 terminfo
lrwxrwxrwx  1 root root    21 Jan 23  2012 cpp -> /etc/alternatives/cpp
lrwxrwxrwx  1 root root    20 Jan  8  2014 libxtables.so.10 -> libxtables.so.10.0.0
-rw-r--r--  1 root root 47712 Jan  8  2014 libxtables.so.10.0.0
-rwxr-xr-x  1 root root 70952 Nov 14  2017 klibc-k3La8MUnuzHQ0_kG8hokcGAC0PA.so
lrwxrwxrwx  1 root root    25 Dec  7 10:38 ld-linux.so.2 -> i386-linux-gnu/ld-2.27.so
drwxr-xr-x  4 root root  4096 Apr 12 16:48 cryptsetup
drwxr-xr-x  3 root root  4096 Apr 12 16:50 lsb
drwxr-xr-x  3 root root  4096 Apr 12 16:51 plymouth
drwxr-xr-x  2 root root  4096 Apr 12 16:51 ifupdown
drwxr-xr-x  3 root root  4096 Apr 12 16:51 recovery-mode
drwxr-xr-x  2 root root 20480 Apr 12 16:52 xtables
drwxr-xr-x  2 root root  4096 Apr 12 16:59 security
drwxr-xr-x  2 root root  4096 Apr 12 17:02 resolvconf
drwxr-xr-x  2 root root  4096 Apr 12 17:02 apparmor
drwxr-xr-x  2 root root  4096 Apr 12 17:02 hdparm
drwxr-xr-x  3 root root  4096 Apr 12 17:03 crda
drwxr-xr-x  2 root root  4096 Apr 12 17:06 modules-load.d
drwxr-xr-x  2 root root  4096 Apr 13 08:13 ufw
drwxr-xr-x 10 root root  4096 Apr 22 16:18 modules
drwxr-xr-x 87 root root 36864 Apr 22 16:20 firmware
drwxr-xr-x  2 root root  4096 Apr 22 16:55 init
drwxr-xr-x  2 root root  4096 Apr 23 09:56 modprobe.d
drwxr-xr-x  8 root root  4096 Apr 23 09:56 systemd
drwxr-xr-x  4 root root  4096 Apr 23 09:57 udev
drwxr-xr-x  2 root root 12288 Apr 23 10:15 i386-linux-gnu
drwxr-xr-x  3 root root 20480 Apr 23 11:55 x86_64-linux-gnu

/lib/security故障服务器上唯一存在的文件是:

-rw-r--r-- 1 root root 18744 Jul 13 2016 pam_ecryptfs.so

我想不通:

  1. 为什么工作服务器上不存在 /lib/security 目录
  2. 如果我甚至需要在有故障的那个上
  3. 指向.so可能被更改的丢失的文件是什么?

非常感谢您的帮助。否则,我将不得不重新安装。

相关内容