Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • P polkit
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 120
    • Issues 120
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
    • Model experiments
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

Admin message

Due to an influx of spam, we have had to impose restrictions on new accounts. Please see this wiki page for instructions on how to get full permissions. Sorry for the inconvenience.

  • polkit
  • polkit
  • Issues
  • #17

pkexec fails with "GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: No session for cookie"

Submitted by Michal Soltys

Assigned to David Zeuthen @david

Link to original bug (#97445)

Description

When no authentication agents are registered and pkexec falls back to pkttyagent, any attempt to authenticate ends with:

pkexec bash ==== AUTHENTICATING FOR org.freedesktop.policykit.exec === Authentication is needed to run `/usr/bin/bash' as the super user Authenticating as: nozo Password: polkit-agent-helper-1: error response to PolicyKit daemon: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: No session for cookie ==== AUTHENTICATION FAILED === Error executing command as another user: Not authorized

Note that pkexec works fine with any other authentication agent, for example if I preceeded the above with

/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &

everything would work fine. By itself, pkttyagent works fine with other commands needing authentication, e.g.

systemctl restart systemd-udevd.service

would execute correctly.

Looks like something is amiss between pkexec and pkttyagent in 0.113. Tested on recent and fully updated Archlinux. For the record, polkit is compiled with following configure line on arch:

./configure --prefix=/usr --sysconfdir=/etc
--localstatedir=/var --libexecdir=/usr/lib/polkit-1
--enable-libsystemd-login=yes --disable-static
--enable-gtk-doc --with-os-type=redhat

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking