[arch-general] gparted cant take root priviliges

Ralf Mardorf ralf.mardorf at rocketmail.com
Thu Jul 10 22:36:36 EDT 2014


On Thu, 2014-07-10 at 20:54 -0400, Mark Lee wrote:
> Run : /usr/bin/gparted_polkit

JFTR the default command of the menu is  /usr/sbin/gparted %f , so the
menu entry has to be changed.

Additionally the OP perhaps has to start something, that isn't
automatically started for the used DE/WM. I e.g. use lightdm to start
JWM.

[rocketmouse at archlinux ~]$ cat .jwmrc 
<?xml version="1.0"?>
<JWM>
  <!-- lxpolkit is needed when e.g. using "pkexec" instead of "gksudo" -->
  <!-- <StartupCommand>/usr/lib/lxpolkit/lxpolkit</StartupCommand> -->
[snip]

I add this line, but commented it out, so it results in

[rocketmouse at archlinux ~]$ /usr/bin/gparted_polkit
Error executing command as another user: No authentication agent found.
[rocketmouse at archlinux ~]$ pkexec gparted
==== AUTHENTICATING FOR org.archlinux.pkexec.gparted ===
Authentication is required to run the GParted Partition Editor
Multiple identities can be used for authentication:
 1.  rocketmouse
 2.  chuser
Choose identity to authenticate as (1-2): rocketmouse
Invalid response `rocketmouse'.
==== AUTHENTICATION CANCELED ===
Error executing command as another user: Not authorized

This incident has been reported.
[rocketmouse at archlinux ~]$ gksudo gparted
======================
libparted : 3.1
======================

It works after starting lxpolkit.

[rocketmouse at archlinux ~]$ /usr/lib/lxpolkit/lxpolkit

[rocketmouse at archlinux ~]$ /usr/bin/gparted_polkit
======================
libparted : 3.1
======================
[rocketmouse at archlinux ~]$ pkexec gparted
======================
libparted : 3.1
======================
[rocketmouse at archlinux ~]$ cat /usr/bin/gparted_polkit
#!/bin/bash
if [ $(which pkexec) ]; then
	pkexec --disable-internal-agent "/usr/bin/gparted" "$@"
else
	/usr/bin/gparted "$@"
fi



More information about the arch-general mailing list