通过查看日志:
/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
本文出自 “xiao.e的网络世界” 博客,请务必保留此出处http://zlfkl.blog.51cto.com/1117526/1683783
ubuntu 突然不能 sudo成功,报错su: Authentication failure
原文地址:http://zlfkl.blog.51cto.com/1117526/1683783