Cannot elevate to root in GUI/desktop
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
-
- Level 2
- Posts: 83
- Joined: Thu Jan 20, 2011 6:57 pm
Cannot elevate to root in GUI/desktop
Whenever I run any applications that would prompt me for my password for sudo (USB Image Writer, gparted, etc), all I get is some flickering dialogue box that *should* be prompting me for a password, but instead it seems it's immediately failing on the password prompt without ever taking a password, and the dialogue immediately goes away. I can use sudo and gksudo from a command line with no problem, but this requires me to know what the specific command for that menu entry is (USB Image Writer is the same utility as the USB formatter, just different command switches. That also fails, obviously).
It would seem to be a problem in my profile, since I don't have this happening in other machines.
It would seem to be a problem in my profile, since I don't have this happening in other machines.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
- austin.texas
- Level 20
- Posts: 12003
- Joined: Tue Nov 17, 2009 3:57 pm
- Location: at /home
Re: Cannot elevate to root in GUI/desktop
I can't say that I understand what is causing that problem. It could be a problem with pkexec instead of sudo.
Just to check your profile, post the result of the command:
Just to check your profile, post the result of the command:
Code: Select all
find $HOME -not -user $USER -exec ls -lad {} \;
Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2018
Linux Linx 2018
-
- Level 2
- Posts: 83
- Joined: Thu Jan 20, 2011 6:57 pm
Re: Cannot elevate to root in GUI/desktop
(I didn't set the original post to notify me of replies, so only just seeing this one)austin.texas wrote: ⤴Sun Feb 04, 2018 9:59 am I can't say that I understand what is causing that problem. It could be a problem with pkexec instead of sudo.
Just to check your profile, post the result of the command:Code: Select all
find $HOME -not -user $USER -exec ls -lad {} \;
Tried that command, and the only files not owned by me are some files in my source-code subdir, and my anbox emulator (none of which would interface with the system utilities). Thus far I get failures with USB Image Writer/USB Formatter (they work off the same executable), the "LightDM GTK Greeter settings", Grub-Customizer, GParted, and some other similar ones that I can't remember immediately.
Re: Cannot elevate to root in GUI/desktop
Hello, jelabarre59.
I just checked here on my Ubuntu 16.04.4. The application menu item "GParted" launches the command
What you could try in order to find out whether it is this pkexec which causes the problem to you is this:
Karl
I just checked here on my Ubuntu 16.04.4. The application menu item "GParted" launches the command
gparted-pkexec
. I.e. the user id switch to root is not done by gksudo, but by pkexec.What you could try in order to find out whether it is this pkexec which causes the problem to you is this:
- Open a terminal window.
- Launch GParted by executing This works correctly? Right?
Code: Select all
gksudo gparted
Close GParted again. - Launch GParted by executing Does it work when invoked from the commandline? Does the terminal window display any error messages? In case it does, please, post them here.
Code: Select all
gparted-pkexec
Karl
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline
-
- Level 2
- Posts: 83
- Joined: Thu Jan 20, 2011 6:57 pm
Re: Cannot elevate to root in GUI/desktop
"gksudo gparted" works fine (have had to do that before, but some other tools want to behave differently depending on how they're called). "gparted-pkexec" fails.karlchen wrote: ⤴Wed Apr 18, 2018 3:52 pm I just checked here on my Ubuntu 16.04.4. The application menu item "GParted" launches the commandgparted-pkexec
. I.e. the user id switch to root is not done by gksudo, but by pkexec.
What you could try in order to find out whether it is this pkexec which causes the problem to you is this:
- Open a terminal window.
- Launch GParted by executing
This works correctly? Right?Code: Select all
gksudo gparted
Close GParted again.- Launch GParted by executing
Does it work when invoked from the commandline? Does the terminal window display any error messages? In case it does, please, post them here.Code: Select all
gparted-pkexec
Code: Select all
~ $ gparted-pkexec
Error executing command as another user: Not authorized
This incident has been reported.
Re: Cannot elevate to root in GUI/desktop
Hello, jelabarre59.
Sorry for not coming back earlier. - Could you, please, check whether the executable has still got its "s" bit on the owner: This should return Note the initial
Best regards,
Karl
Sorry for not coming back earlier. - Could you, please, check whether the executable has still got its "s" bit on the owner:
Code: Select all
ls -l /usr/bin/pkexec
Code: Select all
$ ls -l /usr/bin/pkexec
-rwsr-xr-x 1 root root 23376 Jan 18 2016 /usr/bin/pkexec
rwsr
.Best regards,
Karl
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline
-
- Level 2
- Posts: 83
- Joined: Thu Jan 20, 2011 6:57 pm
Re: Cannot elevate to root in GUI/desktop
Same permissions here, date is almost the same.
Code: Select all
-rwsr-xr-x 1 root root 23376 Jan 17 2016 /usr/bin/pkexec
Re: Cannot elevate to root in GUI/desktop
I get the same thing, but with more fluff:jelabarre59 wrote: ⤴Thu Apr 19, 2018 12:21 pmCode: Select all
~ $ gparted-pkexec Error executing command as another user: Not authorized This incident has been reported.
$ gparted-pkexec
Code: Select all
==== AUTHENTICATING FOR com.ubuntu.pkexec.gparted ===
Authentication is required to run the GParted Partition Editor
Authenticating as: lemur,,, (lemur)
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
This incident has been reported.
FWIW, I wrote a simple replacement for gksudo:
$ cat bin/Gksudo
Code: Select all
#!/bin/sh
#
xfce4-terminal --command="sudo -H -i -u root bash -c '$*' &" --geometry=45x10
In one way it's actually better than the original gksudo because there's a (small) terminal which shows error messages and such.
PS: check :
Code: Select all
ls /usr/share/polkit-1/actions/*part*
/usr/share/polkit-1/actions/com.ubuntu.pkexec.gparted.policy
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Your data and OS are backed up....right?