分享

麒麟V10 SP1服务器版本minimal install之后安装图形界面,图形界面root用户无法登录问题解决方法

朵儿爸 2021-10-4 12:49:27 发表于 已解决 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 2 4647
<b style="">问题现象:</b><p><span style="color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);">麒麟V10 SP1服务器版本minimal install之后,通过yum groupinstall “Server with UKUI GUI”安装图形界面,图形界面root用户无法登录问题,</span><span style="color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);">但ssh可正常登录,</span><span style="color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);">具体现象是输入正确的用户名和密码后,仍旧提示密码错误,见下图</span><br></p><p><img style="max-width:100%" src="https://cdn2.cnxclm.com/187_20211004124614_1.jpg" alt="Image"><span style="color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);"><br></span></p><p><span style="color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);"><br></span></p><p><font color="#333333"><span style="background-color: rgb(255, 255, 255);">原因分析:</span></font></p><p><span style="color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);">查看/var/log/secure日志,有如下输出</span><font color="#333333"><span style="background-color: rgb(255, 255, 255);"><br></span></font></p><p></p>
  1. <font face="Microsoft YaHei" size="3">Oct  4 20:04:25 localhost lightdm[9168]: pam_unix(lightdm:auth): check pass; user unknown
  2. Oct  4 20:04:25 localhost lightdm[9168]: pam_unix(lightdm:auth): authentication failure; logname= uid=0 euid=0 tty=:0 ruser= rhost=
  3. Oct  4 20:04:25 localhost lightdm[9168]: pam_faillock(lightdm:auth): User unknown:  root
  4. Oct  4 20:04:27 localhost lightdm[9201]: PAM unable to dlopen(/usr/lib64/security/pam_console.so): /usr/lib64/security/pam_console.so: cannot open shared object file: No such file or directory
  5. Oct  4 20:04:27 localhost lightdm[9201]: PAM adding faulty module: /usr/lib64/security/pam_console.so
  6. Oct  4 20:04:27 localhost lightdm[9201]: pam_faillock(lightdm:auth): User unknown:  root</font>
复制代码
<span style="color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);">根据报错信息”/usr/lib64/security/pam_console.so: cannot open shared object file: No such file or directory“,报pam_console.so文件不存在,查看确实不存在,</span><br><p></p><p></p>
  1. <font face="Microsoft YaHei" size="3">[root@localhost ~]# ls -rlt /usr/lib64/security/pam_console.so
  2. ls: cannot access ‘/usr/lib64/security/pam_console.so’: No such file or directory
  3. [root@localhost ~]#</font>
复制代码
<span style="color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);">同时检查登录正常的设备,文件也不存在,对比了正常设备vs异常设备的配置文件/etc/pam.d/login,均一样</span><br style="box-sizing: border-box; color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);"><span style="color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);">/etc/pam.d/login文件内容:</span><br><p></p><p></p>
  1. <font face="Microsoft YaHei" size="3">#%PAM-1.0
  2. auth       substack     system-auth
  3. auth       include      postlogin
  4. account    required     pam_nologin.so
  5. account    include      system-auth
  6. password   include      system-auth
  7. # pam_selinux.so close should be the first session rule
  8. session    required     pam_selinux.so close
  9. session    required     pam_loginuid.so
  10. session    optional     pam_console.so
  11. # pam_selinux.so open should only be followed by sessions to be executed in the user context
  12. session    required     pam_selinux.so open
  13. session    required     pam_namespace.so
  14. session    optional     pam_keyinit.so force revoke
  15. session    include      system-auth
  16. session    include      postlogin
  17. -session   optional     pam_ck_connector.so</font>
复制代码
<b>解决方案:</b><p></p><p><span style="color: rgb(51, 51, 51); white-space: pre-wrap; background-color: rgb(255, 255, 255);">将login文件中的:</span><br style="box-sizing: border-box; color: rgb(51, 51, 51); white-space: pre-wrap; background-color: rgb(255, 255, 255);"><span style="color: rgb(51, 51, 51); white-space: pre-wrap; background-color: rgb(255, 255, 255);">session    optional     pam_console.so</span><br style="box-sizing: border-box; color: rgb(51, 51, 51); white-space: pre-wrap; background-color: rgb(255, 255, 255);"><span style="color: rgb(51, 51, 51); white-space: pre-wrap; background-color: rgb(255, 255, 255);">注释掉,重启问题解决。</span><br></p><p><span style="color: rgb(51, 51, 51); white-space: pre-wrap; background-color: rgb(255, 255, 255);"><br></span></p><p><span style="color: rgb(51, 51, 51); white-space: pre-wrap; background-color: rgb(255, 255, 255);"><b>补充信息:</b></span></p><p></p><p style="box-sizing: border-box; margin-bottom: 16px; white-space: pre-wrap; color: rgb(51, 51, 51);">在RedHat官网知识库中查询相关字眼发现了几个比较相似的帖子:</p><p style="box-sizing: border-box; margin-bottom: 16px; white-space: pre-wrap; color: rgb(51, 51, 51);">1、Unable to login via console with error: “PAM adding faulty module: /lib/security/pam_limits.so”<br style="box-sizing: border-box;"><a href="https://access.redhat.com/solutions/462963" style="box-sizing: border-box; background-image: initial; background-position: 0px 0px; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; outline: 0px; cursor: pointer; transition: color 0.3s ease 0s; color: rgb(65, 131, 196); touch-action: manipulation;">https://access.redhat.com/solutions/462963</a><br style="box-sizing: border-box;">2、Cannot log into system, receiving PAM errors in /var/log/secure<br style="box-sizing: border-box;"><a href="https://access.redhat.com/solutions/284653" style="box-sizing: border-box; background-image: initial; background-position: 0px 0px; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; outline: 0px; cursor: pointer; transition: color 0.3s ease 0s; color: rgb(65, 131, 196); touch-action: manipulation;">https://access.redhat.co</a><img style="max-width:100%" src="https://cdn2.cnxclm.com/187_20211004124845_1.jpg" alt="Image"><a href="https://access.redhat.com/solutions/284653" style="box-sizing: border-box; background-image: initial; background-position: 0px 0px; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; outline: 0px; cursor: pointer; transition: color 0.3s ease 0s; color: rgb(65, 131, 196); touch-action: manipulation;">m/solutions/284653</a></p><p style="box-sizing: border-box; white-space: pre-wrap; color: rgb(51, 51, 51);">但均未找到pam_console.so模块问题,一般是pam_linux.so、pam_limits.so问题,Redhat给出的解决方案就是注释掉相关报错模块的配置信息。</p><p></p><p><span style="color: rgb(51, 51, 51); background-color: rgb(255, 255, 255);"><br></span></p><p><img style="max-width:100%" src="https://cdn2.cnxclm.com/187_20211004124852_1.jpg" alt="Image"><span style="color: rgb(51, 51, 51); font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", Monaco, monospace, Tahoma, STXihei, 华文细黑, STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, 宋体, Heiti, 黑体, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255);"><br></span></p>

版权说明:论坛帖子主题均由合作第三方提供并上传,若内容存在侵权,请进行举报

已有(1)人评论

跳转到指定楼层
lemon实名认证 手机认证 发表于 2021-10-4 19:26:18 来自 中国广东广州
这个可以有<img style="max-width:100%" width="32" height="32" src="app/puyuetianeditor/template/img/emotion/7.png" alt="emotion">
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

联系在线客服