Fedora 中的 sudo 错误

Fedora 中的 sudo 错误

我是 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 - 尽管给了它显示的正确密码,我仍无法使用 root 用户认证失败

答案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

相关内容