Ubuntu锁屏后使用正确的密码无法登录,提示密码错误

Ubuntu锁屏后使用正确的密码无法登录,提示密码错误。

Solution 1:
-----------------------------------------------------------------------------------------------------------------
Errors in the logfile /var/log/auth.log
Sep 11 07:50:04 jameszhu unix_chkpwd[3746]: check pass; user unknown
Sep 11 07:50:07 jameszhu unix_chkpwd[3747]: check pass; user unknown
Sep 11 07:50:07 jameszhu unix_chkpwd[3747]: password check failed for user (jzhu)
Sep 11 07:50:07 jameszhu gnome-screensaver-dialog: pam_unix(gnome-screensaver:auth): authentication failure; logname= uid=1000 euid=1000 tty=:0.0 ruser= rhost=  user=jzhu
Sep 11 07:50:09 jameszhu unix_chkpwd[3749]: check pass; user unknown

1. check /etc/pam.d/gnome-screensaver, 发现没有错误
2. 网上说/sbin/unix_chkpwd的属性不对,检查了也没问题
3. 查看/etc/passwd, /etc/group, /etc/shadow, /etc/gshadow发现/etc/gshadow属性不对,改为下面的样子:
-rw-r----- 1 root shadow  813 Sep  8 14:08 /etc/gshadow
-rw-r----- 1 root shadow 1455 Sep  8 14:10 /etc/shadow

Solution 2:
-----------------------------------------------------------------------------------------------------------------
I had this same issue. It turned out that my problem was that  ~/.Xauthority  was updated as root, and from then on only root could read it. It stopped me from starting any X session from my username. I had to  sudo rm ./.Xauthority  and it worked fine after that.


Reference:
-----------------------------------------------------------------------------------------------------------------
http://www.linuxsir.org/bbs/thread336335.html
http://askubuntu.com/questions/210480/desktop-login-fails-terminal-works

你可能感兴趣的:(linux知识)