Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
uid 1000 has no permission to perform this operation[solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1158

PostPosted: Fri Jan 06, 2017 2:53 pm    Post subject: uid 1000 has no permission to perform this operation[solved] Reply with quote

whenever I try to modify any connection in nm-applet I get the following:
uid 1000 has no permission to perform this operation

I have created the following rule:
/etc/polkit-1/rules.d/50-org.freedesktop.NetworkManager.rules
polkit.addRule(function(action, subject) {
if (action.id.indexOf("org.freedesktop.NetworkManager.") == 0 && subject.isInGroup("plugdev")) {
return polkit.Result.YES;
}
});


and
g50-80 ~ # id adel
uid=1000(adel) gid=1000(adel) groups=1000(adel),10(wheel),18(audio),27(video),85(usb),999(systemd-journal),996(input),244(plugdev),1002(libvirt),1003(netdev)

I want the user adel to be able to modify the network(connect/disconnect, modify connections...etc)


Last edited by Adel Ahmed on Thu Jan 26, 2017 3:32 pm; edited 1 time in total
Back to top
View user's profile Send private message
devilheart
l33t
l33t


Joined: 17 Mar 2005
Posts: 832
Location: Villach, Austria

PostPosted: Fri Jan 06, 2017 11:41 pm    Post subject: Reply with quote

Silly question: how old is you gentoo? I tought plugdev group was removed when we didn't need hal anymore.

I would try to change the rule so it checks if you are a member of netdev group
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1158

PostPosted: Sat Jan 07, 2017 9:04 am    Post subject: Reply with quote

it's a new installation, I don;t have hal
the user is in both netdev and plugdev, changing the group in the rule makes no difference :(
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1360
Location: Montréal

PostPosted: Sat Jan 07, 2017 12:09 pm    Post subject: Reply with quote

Is consolekit installed? With Openrc, it manage the user permissions.
_________________
Paul
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1158

PostPosted: Sat Jan 07, 2017 1:31 pm    Post subject: Reply with quote

yes I do:
[ebuild R ] sys-auth/consolekit-1.1.0-r1::gentoo USE="-acl -cgroups -debug -doc -pam -pm-utils -policykit (-selinux) {-test}" 0 KiB
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1360
Location: Montréal

PostPosted: Sat Jan 07, 2017 5:19 pm    Post subject: Reply with quote

Is consolekit is running when you try to use NetworkManager? You may need to activate some consolekit USE flags and recompile it. Me, acl, pam and policykit are active by default. I use Systemd and do not need consolekit but, there may be a consolekit service who need to run.
_________________
Paul
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1158

PostPosted: Sun Jan 08, 2017 9:06 am    Post subject: Reply with quote

I don't think so, no services called consolekit in system
and network manager is compiled without consolekit use flag(masked):
[ebuild R ] net-misc/networkmanager-1.4.0-r1::gentoo USE="bluetooth gnutls systemd wifi -audit -connection-sharing (-consolekit) -dhclient -introspection -json -modemmanager -ncurses -nss -ofono -ppp -resolvconf (-selinux) -teamd {-test} -vala -wext" ABI_X86="(64) -32 (-x32)" 0 KiB


should I try to unmask the use flag or is there a better way?
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1360
Location: Montréal

PostPosted: Sun Jan 08, 2017 12:56 pm    Post subject: Reply with quote

I would add consolekit pam and policykit to the global USE flags in /etc/portage/make.conf
_________________
Paul
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1158

PostPosted: Mon Jan 09, 2017 2:11 pm    Post subject: Reply with quote

I've added the 3 use flags globally, and updated world
same result:
Jan 09 17:09:38 g50-80 NetworkManager[213]: <info> [1483970978.0437] audit: op="device-disconnect" interface="wlp3s0" ifindex=2 pid=305 uid=1000 result="fail" reason="uid 1000 has no permission to perform this operation"
Jan 09 17:09:38 g50-80 slim[214]: (nm-applet:305): nm-applet-WARNING **: disconnect_cb: Device disconnect failed: (1) uid 1000 has no permission to perform this operation

and the same error message
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1158

PostPosted: Fri Jan 13, 2017 1:00 pm    Post subject: Reply with quote

bump
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1158

PostPosted: Sat Jan 14, 2017 6:49 pm    Post subject: Reply with quote

bump
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1158

PostPosted: Thu Jan 26, 2017 3:31 pm    Post subject: Reply with quote

slim was starting xfce4 with a non-login shell, I change the line from
exec startxfce4
to
exec /bin/bash -login /usr/bin/startxfce4

and everything is being displayed just fine now.

thanks everyone for your help
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum