环境介绍:
登录系统的时候采用的是root用户,然后su - oracle帐户后,然后执行startx命令启动图形界面之后就报如下的错误,根据提示是PAM起作用了。如下是错误信息:
[oracle@oracle ~]$ startx
Fatal server error:
PAM authentication failed, cannot start X server.
Perhaps you do not have console ownership?
Please consult the The X.Org Foundation support
at http://wiki.X.Org
for help.
giving up.
xinit: Connection refused (errno 111): unable to connect to X server
xinit: No such process (errno 3): Server error.
Couldnt get a file descriptor referring to the console
解决方案:
编辑这个文件,然后把此文件的内容修改成如下信息即可。然后直接在执行startx
vi /etc/pam.d/xserver
auth sufficient pam_rootok.so
#auth required pam_console.so
auth required pam_permit.so
account required pam_permit.so
相关文章
- 07-27su到普通用户不能起图形 解决办法