#author("2024-01-16T14:49:49+09:00","default:nobuoki","nobuoki")
#author("2024-01-16T23:48:53+09:00","default:nobuoki","nobuoki")
- 2024/01/15 パスまわりの誤記、書式の誤記、括弧の不整合を修正

* tl;dr [#f5cbe3f9]

ルール作ってpolkit再起動でOK

#prism(bash){{{
sudo tee /etc/polkit-1/rules.d/02-allow-colord.rules <<'...'
polkit.addRule(function(action, subject) {
  if ((action.id == "org.freedesktop.color-manager.create-device" ||
      action.id == "org.freedesktop.color-manager.create-profile" ||
      action.id == "org.freedesktop.color-manager.delete-device" ||
      action.id == "org.freedesktop.color-manager.delete-profile" ||
      action.id == "org.freedesktop.color-manager.modify-device" ||
      action.id == "org.freedesktop.color-manager.modify-profile") &&
    subject.isInGroup("{users}")) {
    subject.isInGroup("users")) {
    return polkit.Result.YES;
  }
});
...

sudo tee /etc/polkit-1/rules.d/03-allow-wifi.rules <<'...'
polkit.addRule(function(action, subject) {
  if (action.id == "org.freedesktop.NetworkManager.wifi.scan" &&
    subject.isInGroup("users")) {
    return polkit.Result.YES;
  }
});
...

sudo systemctl restart polkit.service

}}}


* 動作確認した環境 [#r565d0a0]

#prism(bash){{{
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=23.10
DISTRIB_CODENAME=mantic
DISTRIB_DESCRIPTION="Ubuntu 23.10"

$ pkaction --version
pkaction version 123
}}}


* 参考 [#t9a9fe00]

- [[Ubuntu Manpage: polkit - Authorization Manager>https://manpages.ubuntu.com/manpages/mantic/en/man8/polkit.8.html]]

- [["Authentication required. System policy prevents WiFi scans" in FocalFossa - Ask Ubuntu>https://askubuntu.com/questions/1291512/authentication-required-system-policy-prevents-wifi-scans-in-focalfossa]]

- [[xRDP – The Infamous “Authentication Required to Create Managed Color Device” Explained – Griffon's IT Library>https://c-nergy.be/blog/?p=12073]]

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS