Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

[SOLVED] nm-applet not authorized

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
4 posts • Page 1 of 1
Author
Message
BurningMemory
n00b
n00b
Posts: 61
Joined: Tue Jan 17, 2023 2:33 am

[SOLVED] nm-applet not authorized

  • Quote

Post by BurningMemory » Tue Apr 16, 2024 3:59 am

Hello there.

Here's an example of the message networkmanager sends:

Code: Select all

localhost NetworkManager[5739]: <info>  [1713857929.6031] audit: op="device-disconnect" interface="enp10s0" ifindex=2 pid=11239 uid=1000 result="fail" reason="org.freedesktop.NetworkManager.network-control request failed: not authorized"
I've already tried two policies for polkit, as I still suspect the problem is related to it:

Code: Select all

polkit.addRule(function(action, subject) {
	var YES = polkit.Result.YES;
	var permission = {
		"org.freedesktop.NetworkManager.wifi.scan": YES,
		"org.freedesktop.NetworkManager.sleep-wake": YES,
		"org.freedesktop.NetworkManager.settings.modify.own": YES,
		"org.freedesktop.NetworkManager.settings.modify.hostname": YES,
		"org.freedesktop.NetworkManager.network-control": YES,
		"org.freedesktop.NetworkManager.enable-disable-wifi": YES,
		"org.freedesktop.NetworkManager.enable-disable-network": YES,
		"org.freedesktop.NetworkManager.enable-disable-connectivity-check": YES,
	};
	if (subject.isInGroup("wheel")) {
		return permission[action.id];
	}
});
and

Code: Select all

polkit.addRule(function(action, subject) {
    if (action.id.indexOf("org.freedesktop.NetworkManager.") == 0 && subject.isInGroup("plugdev")) {
        return polkit.Result.YES;
    }
});
Yes, my user is indeed in the plugdev group. Both policies didn't solve the problem, so maybe
it's not related to polkit at all, although I do not see any more issues in any log file or dmesg even.
SELinux was in permissive mode when the tests were performed. Also, nmtui does not work too.
Last edited by BurningMemory on Sat May 04, 2024 3:13 am, edited 1 time in total.
Top
alamahant
Advocate
Advocate
Posts: 4032
Joined: Sat Mar 23, 2019 12:12 pm

  • Quote

Post by alamahant » Tue Apr 16, 2024 3:02 pm

The problem is not NM.The problem is nm-applet that should run with elevated permissions.
Try adding your user to "wheel" group because of

Code: Select all

cat /etc/polkit-1/rules.d/55-allowing-all-actions.rules 
polkit.addRule (function (action, subject)
{
  if (subject.isInGroup ("wheel"))
  {
    return polkit.Result.YES;
  }
});

Or run nm-applet with sudo or as root.
Same goes with nmtui and nmcli also.
:)
Top
BurningMemory
n00b
n00b
Posts: 61
Joined: Tue Jan 17, 2023 2:33 am

  • Quote

Post by BurningMemory » Wed Apr 17, 2024 4:11 am

alamahant wrote:The problem is not NM.The problem is nm-applet that should run with elevated permissions.
Try adding your user to "wheel" group because
Thanks for the suggestions, though my user is already in the wheel group.
Also, I don't think running with elevated privs directly is a good idea.
Top
BurningMemory
n00b
n00b
Posts: 61
Joined: Tue Jan 17, 2023 2:33 am

  • Quote

Post by BurningMemory » Sat May 04, 2024 3:12 am

Found out what the problem was. I had /proc mounted with the hidepid=2 fs option.
For some reason the system bus could not read /proc/{pid}/status directory when
trying to authorize usage. What a surprise, the problem turned out to be not with
polkit at all. Wonder if I should file a bug about this, because this is a security
measure after all.
Top
Post Reply

4 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic