저는 Fedora를 처음 사용하는데 sudo 명령을 사용하려고 할 때마다 이 오류가 표시됩니다.
sudo: error in /etc/sudo.conf, line 0 while loading plugin "sudoers_policy"
sudo: unable to load /usr/libexec/sudo/sudoers.so: libldap.so.2: cannot open shared object file: No such file or directory
sudo: fatal error, unable to load plugins
또한 Fedora에서 /etc/sudoers.so 파일을 편집하려고 시도했지만 작동하지 않았습니다. su -
표시된 올바른 비밀번호를 입력했는데도 루트 사용자를 사용할 수 없습니다.인증 실패.
답변1
설치가 손상된 것 같습니다. 이것을 시도해 보십시오:
su - # assuming you remember your root password
dnf reinstall openldap # if it errors out, just `dnf install openldap`
$ ldd /usr/libexec/sudo/sudoers.so
ldd: warning: you do not have execution permission for `/usr/libexec/sudo/sudoers.so'
linux-vdso.so.1 (0x00007ffc8abf3000)
libaudit.so.1 => /lib64/libaudit.so.1 (0x00007ff0adbd2000)
libpam.so.0 => /lib64/libpam.so.0 (0x00007ff0adbc0000)
libldap.so.2 => /lib64/libldap.so.2 (0x00007ff0adb5a000)
liblber.so.2 => /lib64/liblber.so.2 (0x00007ff0adb48000)
libssl.so.3 => /lib64/libssl.so.3 (0x00007ff0adaa5000)
libz.so.1 => /lib64/libz.so.1 (0x00007ff0ada8b000)
libsudo_util.so.0 => /usr/libexec/sudo/libsudo_util.so.0 (0x00007ff0ada6b000)
libcrypto.so.3 => /lib64/libcrypto.so.3 (0x00007ff0ad600000)
libc.so.6 => /lib64/libc.so.6 (0x00007ff0ad423000)
libcap-ng.so.0 => /lib64/libcap-ng.so.0 (0x00007ff0ada61000)
libeconf.so.0 => /lib64/libeconf.so.0 (0x00007ff0ada56000)
libm.so.6 => /lib64/libm.so.6 (0x00007ff0ad343000)
libevent-2.1.so.7 => /lib64/libevent-2.1.so.7 (0x00007ff0ad2ea000)
libsasl2.so.3 => /lib64/libsasl2.so.3 (0x00007ff0ada34000)
/lib64/ld-linux-x86-64.so.2 (0x00007ff0adca6000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x00007ff0ad2d7000)
libcrypt.so.2 => /lib64/libcrypt.so.2 (0x00007ff0ad29d000)
$ rpm -qf /lib64/libldap.so.2
openldap-2.6.3-1.fc37.x86_64