解决systemctl start lightdm启动失败:PAM unable to dlopen(pam_kwallet.so)

问题描述

系统为Ubuntu18.04,预先未安装lightdm,原本默认图形界面为gdm3。在教程的指导下完成lightdm安装,通过systemctl启动lightdm服务时报错,log如下:

$ sudo systemctl start lightdm.service 
$ sudo systemctl status lightdm.service 
● lightdm.service - Light Display Manager
   Loaded: loaded (/lib/systemd/system/lightdm.service; indirect; vendor preset: enabled)
   Active: inactive (dead) since Mon 2021-04-19 17:24:00 CST; 4min 0s ago
     Docs: man:lightdm(1)

4月 19 17:26:59 lightdm[4621]: access control disabled, clients can connect from any host
4月 19 17:26:59 lightdm[6015]: pam_unix(lightdm-greeter:session): session opened for user lightdm by (uid=0)
4月 19 17:26:59 lightdm[6151]: PAM unable to dlopen(pam_kwallet.so): /lib/security/pam_kwallet.so: cannot open shared object file: No such file or directory
4月 19 17:26:59 lightdm[6151]: PAM adding faulty module: pam_kwallet.so
4月 19 17:26:59 lightdm[6151]: PAM unable to dlopen(pam_kwallet5.so): /lib/security/pam_kwallet5.so: cannot open shared object file: No such file or directory
4月 19 17:26:59 lightdm[6151]: PAM adding faulty module: pam_kwallet5.so
4月 19 17:26:59 lightdm[6151]: pam_succeed_if(lightdm:auth): requirement "user ingroup nopasswdlogin" not met by user "yuyize"
4月 19 17:27:03 lightdm[6151]: pam_unix(lightdm:auth): authentication failure; logname= uid=0 euid=0 tty=:0 ruser= rhost=  user=yuyize
4月 19 17:27:03 lightdm[6151]: pam_sss(lightdm:auth): authentication success; logname= uid=0 euid=0 tty=:0 ruser= rhost= user=yuyize
4月 19 17:27:03 lightdm[6151]: pam_unix(lightdm:session): session opened for user yuyize by (uid=0)

主要错误为:
PAM unable to dlopen(pam_kwallet.so): /lib/security/pam_kwallet.so: cannot open shared object file: No such file or directory

PAM unable to dlopen(pam_kwallet5.so): /lib/security/pam_kwallet5.so: cannot open shared object file: No such file or directory

解决办法

该链接给出解决方案:
https://forums.linuxmint.com/viewtopic.php?t=286950

即:

  1. /etc/pam.d/lightdm/etc/pam.d/lightdm-greeter这两个配置文件进行编辑:
$ sudo gedit /etc/pam.d/lightdm
$ sudo gedit /etc/pam.d/lightdm-greeter
  1. 分别将两个文件中以下几行代码注释掉(行起始处插入#
auth    optional        pam_kwallet.so
auth    optional        pam_kwallet5.so
session optional        pam_kwallet.so auto_start
session optional        pam_kwallet5.so auto_start
  1. 注销后重新登录账户,使用systemctl start lightdm命令重新启动lightdm服务,再通过systemctl status lightdm可以看到lightdm成功启动
$ sudo systemctl status lightdm.service | more
● lightdm.service - Light Display Manager
   Loaded: loaded (/lib/systemd/system/lightdm.service; indirect; vendor preset: enabled)
   Active: active (running) since Mon 2021-04-19 17:24:00 CST; 24min ago
     Docs: man:lightdm(1)
  Process: 4618 ExecStartPre=/bin/sh -c [ "$(basename $(cat /etc/X11/default-display-manager 2>/dev/null))" = "lightdm" ] (code=exited, status=0/SUCCESS)
 Main PID: 4621 (lightdm)
    Tasks: 21 (limit: 4915)
   CGroup: /system.slice/lightdm.service
           ├─4621 /usr/sbin/lightdm
           └─8215 /usr/lib/xorg/Xorg -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch

4月 19 17:27:03 lightdm[6151]: pam_unix(lightdm:auth): authentication failure; logname= uid=0 euid=0 tty=:0 ruser= rhost=  user=yuyize
4月 19 17:27:03 lightdm[6151]: pam_sss(lightdm:auth): authentication success; logname= uid=0 euid=0 tty=:0 ruser= rhost= user=yuyize
4月 19 17:27:03 lightdm[6151]: pam_unix(lightdm:session): session opened for user yuyize by (uid=0)
4月 19 17:47:55 lightdm[4621]: access control disabled, clients can connect from any host
4月 19 17:47:55 lightdm[4621]: access control disabled, clients can connect from any host
4月 19 17:47:55 lightdm[8259]: pam_unix(lightdm-greeter:session): session opened for user lightdm by (uid=0)
4月 19 17:47:56 lightdm[8394]: pam_succeed_if(lightdm:auth): requirement "user ingroup nopasswdlogin" not met by user "yuyize"
4月 19 17:47:59 lightdm[8394]: pam_unix(lightdm:auth): authentication failure; logname= uid=0 euid=0 tty=:0 ruser= rhost=  user=yuyize
4月 19 17:47:59 lightdm[8394]: pam_sss(lightdm:auth): authentication success; logname= uid=0 euid=0 tty=:0 ruser= rhost= user=yuyize
4月 19 17:47:59 lightdm[8394]: pam_unix(lightdm:session): session opened for user yuyize by (uid=0)
  • 1
    点赞
  • 19
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值