# uid 1000 has no permission to perform this operation[solved]

## Adel Ahmed

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

----------

## devilheart

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

----------

## Adel Ahmed

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  :Sad: 

----------

## Logicien

Is consolekit installed? With Openrc, it manage the user permissions.

----------

## Adel Ahmed

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

----------

## Logicien

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.

----------

## Adel Ahmed

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?

----------

## Logicien

I would add consolekit pam and policykit to the global USE flags in /etc/portage/make.conf

----------

## Adel Ahmed

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

----------

## Adel Ahmed

bump

----------

## Adel Ahmed

bump

----------

## Adel Ahmed

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

----------

