Skip to content

Unable to use polkit agents #1025

Description

@RossSmyth

Bug description

  1. On all of my NixOS computers I use run0 rather than sudo, except on WSL on my work laptop.
  2. Attempting to run pkexec results in failed auth:
❯ pkexec ls
==== AUTHENTICATING FOR org.freedesktop.policykit.exec ====
Authentication is needed to run `/run/current-system/sw/bin/ls' as the super user
Authenticating as: rsmyth
Password:

** (process:5638): WARNING **: 16:27:17.960: Unknown line 'polkit-agent-helper-1: error response to PolicyKit daemon: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: No session for cookie' from helper
==== AUTHENTICATION FAILED ====
Error executing command as another user: Not authorized

This incident has been reported.

or run0

❯ run0 ls
Failed to start transient service unit: Access denied as the requested operation requires interactive authentication. However, interactive authentication has not been enabled by the calling program.
  1. I have asked for help several times on Matrix, and have been told to use polkit agents. I have tried several different agents and so far none have worked. I would hope that the built-in ttyagent would be fine. I've also tried various configurations with polkit and so far nothing has worked.

To Reproduce

Steps to reproduce the behavior:

The config here:
https://github.com/RossSmyth/nixos

nixos-rebuild build -I nixpkgs="$(npins get-path nixpkgs)" --attr work

Logs

See above

WSL version

WSL version: 2.6.3.0
Kernel version: 6.6.87.2-1
WSLg version: 1.0.71
MSRDC version: 1.2.6353
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.19045.6456

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions