解决Xrdp远程登录Ubuntu需要多次输入密码认证的问题

2023-05-16

问题描述

使用 xrdp 远程登录Ubuntu,总是会出现弹框要求输入密码

描述信息一般是:

  1. 需要授权来创建色彩管理设备 / Authentication is required to create a color managed device
  2. 需要授权来移除色彩管理设备 / Authentication is required to remove a color managed device
  3. 刷新系统软件源需要认证 / Authentication is required to refresh the system repositories

解决方案

  • 解决“色彩管理设备” / “color managed device” 弹窗
    创建文件 /etc/polkit-1/localauthority/50-local.d/45-allow-colord.pkla 并写入内容:

[Allow Colord all Users]
Identity=unix-user:*
Action=org.freedesktop.color-manager.create-device;org.freedesktop.color-manager.create-profile;org.freedesktop.color-manager.delete-device;org.freedesktop.color-manager.delete-profile;org.freedesktop.color-manager.modify-device;org.freedesktop.color-manager.modify-profile
ResultAny=no
ResultInactive=no
ResultActive=yes

  • 解决“刷新系统软件源需要认证” / “refresh the system repositories” 弹窗
    创建文件 /etc/polkit-1/localauthority/50-local.d/46-allow-packagekit.pkla 并写入内容:
[Allow Refresh Repository all Users]
Identity=unix-user:*
Action=org.freedesktop.packagekit.system-sources-refresh
ResultAny=no
ResultInactive=no
ResultActive=yes

!!! 若仍未解决问题继续往下看

以上解决方案可能有很多情况没有覆盖,可能有其他情况需要输入密码,此处描述解决方法。

  1. 首先使用命令进入到actions目录

    cd /usr/share/polkit-1/actions

查看目录下policy文件

  1. 以 “刷新系统软件源需要认证” 为例,搜索相关内容:

找到org.freedesktop.packagekit.policy并打开

查看对应刷新系统软件源需要认证这一项的action id
将上述配置方法中的Action的值配置为action id
Action=org.freedesktop.packagekit.system-sources-refresh

至此问题解决,后续登录无需输入密码

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

解决Xrdp远程登录Ubuntu需要多次输入密码认证的问题 的相关文章

随机推荐