You are not logged in.
"Not authorized to share connections via wifi."
I get this after clicking the 'hotspot' button in network manager's widget.
How do I obtain this authorization? Is it a group I need to add to my user?
EDIT: my currents groups are:
```
groups
network apps nix-users realtime docker libvirt audio wheel thoth unrealengine-users
```
Last edited by thoth (2024-11-02 16:49:01)
Offline
NM seems to query polkit for that, see /usr/share/polkit-1/actions/org.freedesktop.NetworkManager.policy
Offline
Ok, success to a new error:
Connection 'thoth-hotspot' is not available on device wlan0 because device is not available
but `ip a` does indeed list as DOWN and no addresses assigned to it:
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether aa:aa:de:ad:be:ef brd ff:ff:ff:ff:ff:ff permaddr de:ad:de:ad:be:ef
as per what I did for the poor internet searcher who happens into here, first I made a polkit rule and tried one rule, then I grabbed all the action id's out of that file and converted them to be used as a polkit rule:
grep 'action id' /usr/share/polkit-1/actions/org.freedesktop.NetworkManager.policy | sed 's/^\s*<action id=\(.*\)>/ if (action.id == \1 \&\&/' |sudo tee -a /etc/polkit-1/rules.d/49-allow-thoth-set-net.rules
and then added the rest of the rule so each looked like:
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.NetworkManager.wifi.share.open" &&
subject.user == "thoth") {
return polkit.Result.YES;
}
});
Last edited by thoth (2024-11-02 17:14:12)
Offline
Ok, and the last piece of the puzzle is to check nmcli radio and turn on wifi
❯ nmcli radio
WIFI-HW WIFI WWAN-HW WWAN
enabled disabled missing enabled
❯ nmcli radio wifi on
❯ nmcli radio
WIFI-HW WIFI WWAN-HW WWAN
enabled enabled missing enabled
As always Seth you are an amazing help, and your avatar is awesome!
Last edited by thoth (2024-11-02 17:41:24)
Offline
I barely pointed into the relevant direction
You can btw. likely just "dbus-monitor --system" to sniff what NM is asking from polkit.
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.
Offline