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

编程知识 更新时间:2023-05-02 02:53:55

问题描述

使用 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

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

更多推荐

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

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

发布评论

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

>www.elefans.com

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

  • 102816文章数
  • 26166阅读数
  • 0评论数