更新后无法在 Ubuntu 14.04 上自动登录

更新后无法在 Ubuntu 14.04 上自动登录

我刚刚做了一些更新,现在无法自动登录我的 Ubuntu 14.04。以前我可以自动登录,但有时却不能。我猜这是由 systemd 的某些原因造成的。这是我启动时的 auth.log,

Jul 31 06:05:02 bagustris-MacBookPro lightdm: pam_unix(lightdm-autologin:session): session opened for user bagustris by (uid=0)
Jul 31 06:05:02 bagustris-MacBookPro systemd-logind[1138]: New session c1 of user bagustris.
Jul 31 06:05:02 bagustris-MacBookPro systemd-logind[1138]: Linked /tmp/.X11-unix/X0 to /run/user/1000/X11-display.
Jul 31 06:05:03 bagustris-MacBookPro gnome-keyring-daemon[1759]: couldn't set environment variable in session: The name org.gnome.SessionManager was not provided by any .service files
Jul 31 06:05:03 bagustris-MacBookPro gnome-keyring-daemon[1759]: message repeated 2 times: [ couldn't set environment variable in session: The name org.gnome.SessionManager was not provided by any .service files]
Jul 31 06:05:05 bagustris-MacBookPro gnome-keyring-daemon[1759]: The GPG agent was already initialized
Jul 31 06:05:05 bagustris-MacBookPro gnome-keyring-daemon[1759]: The SSH agent was already initialized
Jul 31 06:05:05 bagustris-MacBookPro gnome-keyring-daemon[1759]: The PKCS#11 component was already initialized
Jul 31 06:05:05 bagustris-MacBookPro gnome-keyring-daemon[1759]: The Secret Service was already initialized
Jul 31 06:05:07 bagustris-MacBookPro polkitd(authority=local): Registered Authentication Agent for unix-session:c1 (system bus name :1.40 [/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1], object path /org/gnome/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)
Jul 31 06:05:11 bagustris-MacBookPro dbus[979]: [system] Rejected send message, 7 matched rules; type="method_return", sender=":1.20" (uid=0 pid=1816 comm="/usr/sbin/dnsmasq --no-resolv --keep-in-foreground") interface="(unset)" member="(unset)" error name="(unset)" requested_reply="0" destination=":1.5" (uid=0 pid=1280 comm="NetworkManager ")
Jul 31 06:05:12 bagustris-MacBookPro polkitd(authority=local): Unregistered Authentication Agent for unix-session:c1 (system bus name :1.40, object path /org/gnome/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
Jul 31 06:05:12 bagustris-MacBookPro lightdm: pam_unix(lightdm-autologin:session): session closed for user bagustris

我的电脑是 macbook pro 13", mid2012。我也在autologin-user=myusername /etc/lightdm/lightdm.conf 中添加了。当然,我也在系统设置 >> 用户帐户中设置了 aulogin。

有什么办法可以解决这个问题?我需要自动登录来加快我的启动时间。

答案1

经过几次尝试,它又恢复了。我不知道哪种解决方案有效,但我做了以下操作:在 /etc/lightdm/lightdm.conf 中我添加了:

  pam-autologin-service=lightdm-autologin

我创建了新文件 /etc/lightdm.conf.d/50-myconfig.conf,其中包含以下内容正如这里解释的那样

[SeatDefaults]
autologin-user=bagustris

另一个解决方法是检查 /etc/pam.d/lightdm-autologin。确保没有奇怪或权限问题,并将找到的登录设置参考此“ligthdm-autologin”。

还有另一种解决方法,如这里这里

sudo chmod a+r /etc/shadow
sudo chown user:user .Xauthority

相关内容