为什么无法登录我的 Debian 控制台?

为什么无法登录我的 Debian 控制台?

我通常用用户名“debian”登录我的Debian机器,今天我发现用这个用户名无法登录,但可以用“root”登录。

可能相关的信息:

root@localhost:~# grep 'debian' /etc/group
cdrom:x:24:debian
floppy:x:25:debian
audio:x:29:debian
dip:x:30:debian
video:x:44:debian
plugdev:x:46:debian
scanner:x:103:debian
netdev:x:106:debian
debian:x:1000:

root@localhost:~# id debian
uid=1000(debian) gid=1000(debian)    groups=1000(debian),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),103(scanner),106(netdev)

root@localhost:echo "" >  /var/log/auth.log

我已经重新启动两次但仍然遇到同样的问题。

以 root 身份登录后,我得到:

root@localhost:cat /var/log/auth.log

Apr 25 13:04:15 localhost lightdm: pam_unix(lightdm:session): session closed for user root
Apr 25 13:04:15 localhost polkitd(authority=local): Unregistered Authentication Agent for unix-session:/org/freedesktop/ConsoleKit/Session14 (system bus name :1.56, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
Apr 25 13:05:10 localhost lightdm: PAM unable to dlopen(pam_gnome_keyring.so): /lib/security/pam_gnome_keyring.so: cannot open shared object file: No such file or directory
Apr 25 13:05:10 localhost lightdm: PAM adding faulty module: pam_gnome_keyring.so
Apr 25 13:05:10 localhost lightdm: pam_unix(lightdm:session): session opened for user lightdm by (uid=0)
Apr 25 13:05:10 localhost lightdm: pam_ck_connector(lightdm:session): nox11 mode, ignoring PAM_TTY :0
Apr 25 13:05:18 localhost dbus[2567]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.12" (uid=107 pid=3334 comm="/usr/sbin/lightdm-gtk-greeter ") interface="org.freedesktop.DBus.Properties" member="GetAll" error name="(unset)" requested_reply="0" destination=":1.10" (uid=0 pid=3195 comm="/usr/sbin/console-kit-daemon --no-daemon ")
Apr 25 13:05:18 localhost lightdm: PAM unable to dlopen(pam_gnome_keyring.so): /lib/security/pam_gnome_keyring.so: cannot open shared object file: No such file or directory
Apr 25 13:05:18 localhost lightdm: PAM adding faulty module: pam_gnome_keyring.so
Apr 25 13:09:01 localhost CRON[3706]: pam_unix(cron:session): session opened for user root by (uid=0)
Apr 25 13:09:02 localhost CRON[3706]: pam_unix(cron:session): session closed for user root
Apr 25 13:17:01 localhost CRON[3726]: pam_unix(cron:session): session opened for user root by (uid=0)
Apr 25 13:17:01 localhost CRON[3726]: pam_unix(cron:session): session closed for user root
Apr 25 13:31:52 localhost lightdm: pam_unix(lightdm:session): session closed for user lightdm
Apr 25 13:31:52 localhost lightdm: pam_unix(lightdm:session): session opened for user debian by (uid=0)
Apr 25 13:31:52 localhost lightdm: pam_ck_connector(lightdm:session): nox11 mode, ignoring PAM_TTY :0
Apr 25 13:31:52 localhost lightdm: PAM unable to dlopen(pam_gnome_keyring.so): /lib/security/pam_gnome_keyring.so: cannot open shared object file: No such file or directory
Apr 25 13:31:52 localhost lightdm: PAM adding faulty module: pam_gnome_keyring.so
Apr 25 13:31:52 localhost lightdm: pam_unix(lightdm:session): session opened for user lightdm by (uid=0)
Apr 25 13:31:52 localhost lightdm: pam_ck_connector(lightdm:session): nox11 mode, ignoring PAM_TTY :0
Apr 25 13:31:53 localhost dbus[2567]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.19" (uid=107 pid=3786 comm="/usr/sbin/lightdm-gtk-greeter ") interface="org.freedesktop.DBus.Properties" member="GetAll" error name="(unset)" requested_reply="0" destination=":1.10" (uid=0 pid=3195 comm="/usr/sbin/console-kit-daemon --no-daemon ")
Apr 25 13:31:53 localhost lightdm: PAM unable to dlopen(pam_gnome_keyring.so): /lib/security/pam_gnome_keyring.so: cannot open shared object file: No such file or directory
Apr 25 13:31:53 localhost lightdm: PAM adding faulty module: pam_gnome_keyring.so
Apr 25 13:31:58 localhost lightdm: pam_unix(lightdm:session): session closed for user lightdm
Apr 25 13:31:58 localhost lightdm: pam_unix(lightdm:session): session opened for user debian by (uid=0)
Apr 25 13:31:58 localhost lightdm: pam_ck_connector(lightdm:session): nox11 mode, ignoring PAM_TTY :0
Apr 25 13:31:59 localhost lightdm: PAM unable to dlopen(pam_gnome_keyring.so): /lib/security/pam_gnome_keyring.so: cannot open shared object file: No such file or directory
Apr 25 13:31:59 localhost lightdm: PAM adding faulty module: pam_gnome_keyring.so
Apr 25 13:31:59 localhost lightdm: pam_unix(lightdm:session): session opened for user lightdm by (uid=0)
Apr 25 13:31:59 localhost lightdm: pam_ck_connector(lightdm:session): nox11 mode, ignoring PAM_TTY :0
Apr 25 13:31:59 localhost dbus[2567]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.24" (uid=107 pid=3828 comm="/usr/sbin/lightdm-gtk-greeter ") interface="org.freedesktop.DBus.Properties" member="GetAll" error name="(unset)" requested_reply="0" destination=":1.10" (uid=0 pid=3195 comm="/usr/sbin/console-kit-daemon --no-daemon ")
Apr 25 13:31:59 localhost lightdm: PAM unable to dlopen(pam_gnome_keyring.so): /lib/security/pam_gnome_keyring.so: cannot open shared object file: No such file or directory
Apr 25 13:31:59 localhost lightdm: PAM adding faulty module: pam_gnome_keyring.so
Apr 25 13:32:05 localhost lightdm: pam_unix(lightdm:session): session closed for user lightdm
Apr 25 13:32:05 localhost lightdm: pam_unix(lightdm:session): session opened for user root by (uid=0)
Apr 25 13:32:05 localhost lightdm: pam_ck_connector(lightdm:session): nox11 mode, ignoring PAM_TTY :0
Apr 26 13:32:08 localhost polkitd(authority=local): Registered Authentication Agent for unix-session:/org/freedesktop/ConsoleKit/Session6 (system bus name :1.30 [/usr/lib/i386-linux-gnu/lxpolkit], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)

出了什么问题,我该如何解决?

答案1

由于某种原因,我的~/.Xauthority不属于该debian用户。更改所有权允许我登录:

chown -R debian  /home/debian/.Xauthority 

相关内容