xrdp 远程登录需要输入很多次密码

编程知识 更新时间:2023-05-02 02:44:22

本人环境为 Ubuntu 20.04

文章目录

  • 问题描述
  • 解决方案
    • 解决“色彩管理设备” / "color managed device" 弹窗
    • 解决“刷新系统软件源需要认证” / "refresh the system repositories" 弹窗
  • 相关方法

问题描述

使用 xrdp 远程登录 Ubuntu,可能会出现以下弹框要求输入密码:

描述信息一般是:

  • 需要授权来创建色彩管理设备 / Authentication is required to create a color managed device
  • 需要授权来移除色彩管理设备 / Authentication is required to remove a color managed device
  • 刷新系统软件源需要认证 / 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

相关方法

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

需要认证跟 Polkit 有关系,可以在目录 /usr/share/polkit-1/actions 找到一堆 Policy 文件:

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

➜  actions grep "刷新系统软件源需要认证" * 
org.freedesktop.packagekit.policy:    <message xml:lang="zh_CN">刷新系统软件源需要认证</message>

根据搜索结果打开文件 org.freedesktop.packagekit.policy

以下内容表示默认需要管理员权限:

记录 Policy 文件内容中的 action id,参考上节解决方案中的配置文件内容:

[Allow Refresh Repository all Users]
Identity=unix-user:*
Action=org.freedesktop.packagekit.system-sources-refresh
ResultAny=no
ResultInactive=no
ResultActive=yes

Action 的值配置为 action id。
参考上节解决方案完成配置后,后续登录就无须再次输入密码。

更多推荐

xrdp 远程登录需要输入很多次密码

本文发布于:2023-04-25 08:22:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/6e9cea9db4c680868ce35c0b83843a31.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:很多次   密码   远程登录   xrdp

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!

  • 102633文章数
  • 26164阅读数
  • 0评论数