Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pkexec authentication issue
From my post in Ask Ubuntu here:

Because they decided to ditch gksu for some reason, we are forced to only use pkexec. I am currently very new to Ubuntu 18.04 and I am facing this as an issue probably also because of my incompetence.

I followed the suggestion provided by Radu here however I am having issues. In my situation, I get the following error

    Authentication is required to run gedit
    Authenticating as: meat258,,, (meat258)
    polkit-agent-helper-1: error response to PolicyKit daemon: GDBus.Errorrg.freedesktop.PolicyKit1.Error.Failed: No session for cookie
    Error executing command as another user: Not authorized

This incident has been reported.

Despite I know that my root password is correct. Assuming I am new, any help would be appreciated.

`/etc/lsb-release` in my system lists,

    DISTRIB_DESCRIPTION="Ubuntu 18.04.3 LTS"

And the fact that this is Ubuntu Mate. If you need to know any more info, I would happily provide. Please assume I am a novice user.

Actually, the actual command I used was

pkexec gedit

Its true that gedit isn't installed by default on Ubuntu Mate so I installed it wilt sudo apt install gedit. Besides, its such a lightweight program and an example used in that other Ask Ubuntu post. Its an unfortunate only I got this issue.
out of curiosity try running pkexec gedit as root (not sudo)
gksudo alternatives

If you are trying to edit a file needing administrator privileges like /etc/fstab you have a number of gksudo alternatives. 

gedit admin:///etc/fstab

This type of syntax only works on gvfs aware applications. 

You can use the sudoedit command as follows:

env SUDO_EDITOR='/usr/bin/vi'
sudoedit /etc/fstab

The was just an example.  You should always save a copy of any system configuration file before modifying them. 

Acronyms can be confusing for a new user.  Knowing this forum has a large new user audience I should not use the gvfs acronym, but I am referring to the gnome virtual file system.  As one example many distros utilize gvfs features to implement the auto mounting or unmounting of removable media. 

Idea  Give a man a fish, and you feed him for a day. Teach a man to fish, and you feed him for a lifetime.


Forum Jump:

Users browsing this thread: 1 Guest(s)