You are not logged in.
Pages: 1
I use thunar, gvfs, polkit and polkit-gnome in Awesome in Arch Linux which is installed on LVM and dual-booted with Fedora.
Everything is ok but when I click on Fedora's home partition in Thunar's side pane in Arch Linux, polkit-gnome prompts for root password. I think it should prompt for user password.
my /etc/polkit-1/rules.d/50-default.rules is
/* -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- */
// DO NOT EDIT THIS FILE, it will be overwritten on update
//
// Default rules for polkit
//
// See the polkit(8) man page for more information
// about configuring polkit.
polkit.addAdminRule(function(action, subject) {
return ["unix-group:wheel"];
});
my user is member of these groups:
lp users wheel
According to Arch wiki page https://wiki.archlinux.org/index.php/Polkit
saying this:
The Arch default is to make all members of the group wheel administrators.
it should prompt for user password, I think. But not.
Last edited by duyinthee (2016-10-13 08:19:30)
Offline
for testing purpose, I installed gparted and run this command:
$ pkexec --user myusername gparted
then polkit prompts for root password. Why? It should prompts for my user password because my /etc/polkit-1/rules.d/50-default.rules is this:
polkit.addAdminRule(function(action, subject) {
return ["unix-group:wheel"];
});
I have been googling and running trail and error all day.
I can not launch gparted from dmenu as well. It says "Root privileges are required for running GParted"
I think, polkit-gnome is supposed to pop-up and ask for my user password. But not.
Last edited by duyinthee (2016-10-11 09:25:09)
Offline
polkit-gnome issue?
Does it only *say* enter the root password or does it really (and only) take the root password?
Offline
yeah, it does not only saying "enter root password", but also really take the root password.
I have also tried mate-polkit, it does same as polkit-gnome.
Offline
What if you kick all agents and use the direct input on "pkexec foo" from a textshell?
Offline
yes,
$ pkexec --user myusername anypackage
or
$ pkexec anypackage
prompts for root password.
Offline
Have you seen https://bbs.archlinux.org/viewtopic.php?id=218064?
Offline
yes, I have read but not helpful.
my
$ loginctl show-session $XDG_SESSION_ID
shows
Id=c1
User=1000
Name=msh
Timestamp=Wed 2016-10-12 09:43:56 MMT
TimestampMonotonic=59838460
VTNr=1
Seat=seat0
TTY=tty1
Remote=no
Service=login
Scope=session-c1.scope
Leader=434
Audit=0
Type=tty
Class=user
Active=yes
State=active
IdleHint=yes
IdleSinceHint=1476242577627982
IdleSinceHintMonotonic=600966826
LockedHint=no
and
$ loginctl
shows
SESSION UID USER SEAT
c1 1000 msh seat0
Offline
Do you have more rules in /etc/polkit-1/rules.d/? Does any of them contain the string "root"?
Offline
No, I have only that 50-default.rules in that dir.
Offline
Anything related in /usr/share/polkit-1/* ? (sorry, forgot the other path ...)
Offline
there are two folders in that dir /usr/share/polkit-1.
one is actions and one is rules.d folders
.policy files are in actions and rules.d folder is empty.
Offline
Yup, does any of the policy in actions containt the string "root"?
Offline
No, non of them contain the string "root".
Offline
Grep everything in those paths for "addAdminRule".
Wouldn't it be cool if pkcheck could do anything but telling you "subject not specified", like, telling you the requirements to execute some action, as it f**** suggests to do ... :-\
Offline
I think I found solution. Look at in my first post, I said
$ groups myusername
shows:
lp users wheel
Actually, It should be
lp wheel users
I think I did
# useradd -m -G users -g wheel -s /bin/bash myusername
instead of
-g users -G wheel
when I created my user account in Arch installation process.
Now, I deleted my user account first and created new one with the same name (without "-m" option in command) like this:
# useradd -g users -G wheel -s /bin/bash myusername
Now user password is prompted to mount volume in thunar.
Anyway, gparted is still need root privileges to open. I think it is different story.
Last edited by duyinthee (2016-10-13 08:20:20)
Offline
gparted is not a polkit/dbus program; it has to be run as root. So either pkexec it, or use *sudo
Offline
Pages: 1