通过查看日志:
/var/log/auth.log
报错:
su[9959]: PAM unable to dlopen(pam_rootok.so): /lib/security/pam_rootok.so: cannot open shared object file: No such file or directory
su[9959]: PAM adding faulty module: pam_rootok.so
su[9959]: PAM unable to dlopen(pam_unix.so): /lib/security/pam_unix.so: cannot open shared object file: No such file or directory
su[9959]: PAM adding faulty module: pam_unix.so
su[9959]: pam_authenticate: Authentication failure
su[9959]: FAILED su for root by dev
su[9959]: - /dev/pts/27 dev:root
解决办法:apt-get install libpcre3 login
注意:如果你是第一次安装,还没有设置过/etc/sudoers,请使用visudo进行设置,具体教程请baidu
时间: 2024-11-01 16:10:45