我正在使用 Ubuntu 14.04.2 LTS,断电后无法登录。
这台电脑已经运行了几个月,但突然发生了这种情况。
症状是:
- 登录尝试后,屏幕变黑约 15 秒,然后返回登录屏幕。
- 我可以毫无问题地以访客身份登录
- 我可以通过tty1~tty6以我自己的身份登录
我尝试/检查了以下内容,但没有成功:
更改
.Xauthority
所有权无效
chown username:username .Xauthority
更改用户目录权限无效
sudo chmod -R u+w /home/[username]
我尝试干预 lightdm
dpkg-reconfigure lightdm
sudo mv ~/.Xauthority ~/.Xauthority.backup
sudo service lightdm restart
什么也没有
.xsession-errors
尝试过
gdm
,lightdm
但有完全相同的问题卸载
lightdm
并重新安装/tmp
目录确实显示drwxrwxrwt
我在网上找到的这些解决方案都不起作用。有人能帮忙吗?
编辑1):
当我输入 时sudo tail /var/log/lightdm/lightdm.log
,显示了 10 行。(全部以 开头DEBUG:
):
Activating VT 7
Activating login1 session c3
Session pid=8697: Greeter connected version=1.10.4
Session pid=8697: Greeter start authentication for [username]
Session pid=8769: Started with service 'lightdm', username [username]
Session pid=8769: Got 1 message from PAM
Session pid=8697: Propmpt greeter with 1 message
User /org/freedesktop/Accounts/User 1000 changed (repeated 3 times)
此外,当我输入时ls /usr/share/xsessions/
,它会显示
gnome.desktop ubuntu.desktop
编辑2):
sudo grep 'lightdm:' /var/log/auth.log | tail
给出以下内容,全部以 开头lightdm:
:
pam_ck_connector(lightdm:session): nox11 mode, ignoring PAM_TTY :0
pam_unix(lighdm:session): session closed for user [username]
PAM unable to dlopen(pam_kwallet.so): /lib/security/pam_kwallet.so: cannot open shared object file: No such file or directory
PAM adding faulty module: pam_kwallet.so
pam_unix(lightdm-greeter:session): session opened for user lightdm by (uid=0)
pam_ck_connector(lightdm-greeter:session): nox11 mode, ignoring PAM_TTY :0
PAM unable to dlopen(pam_kwallet.so): /lib/security/pam_kwallet.so: cannot open shared object file: No such file or directory
PAM adding faulty module: pam_kwallet.so
pam_succeed_if(lightdm:auth): requirement "user ingroup nopasswdlogin" not met by user [username]"
(this one starts with sudo: instead of lightdm:) [username] : TTY=tty1 ; PWD=/home/[username] ; USER=root ; COMMAND=/bin/grep lightdm: /var/log/auth.log
答案1
对我来说,解决方案只是从 tty1 运行此命令:
sudo rm .Xauthority
答案2
我知道已经过去了一段时间,但如果问题仍然存在,我会这样做。这看起来很像“用户”特有的问题,尤其是在重新安装之后。
首先,尝试创建一个新用户 ( sudo adduser "username"
),看看是否可行。如果可行,则可确认本地配置存在错误。
尝试使用以下命令开始新的配置(使用有问题的用户名从 tty 登录后)
mkdir ~/cfg-backups
mv ~/.config ~/cfg-backup
mv ~/.dconf ~/cfg-backup
并检查您是否恢复了业务。然后您可以从所需的备份中恢复任何配置。
答案3
就我而言,以下方法解决了这个问题
首先按 登录 tty CtrlAltF1。
重新安装 Ubuntu 桌面(即 Unity)
sudo apt-get install --reinstall ubuntu-desktop
这里还有一些其他提示:ubuntu14.04登录循环问题