You are not logged in.

#1 2024-11-02 16:37:39

thoth
Member
Registered: 2010-01-10
Posts: 90

Failed to create hotspot.

"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

#2 2024-11-02 16:48:46

seth
Member
Registered: 2012-09-03
Posts: 59,216

Re: Failed to create hotspot.

NM seems to query polkit for that, see /usr/share/polkit-1/actions/org.freedesktop.NetworkManager.policy

Offline

#3 2024-11-02 17:12:46

thoth
Member
Registered: 2010-01-10
Posts: 90

Re: Failed to create hotspot.

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

#4 2024-11-02 17:26:44

thoth
Member
Registered: 2010-01-10
Posts: 90

Re: Failed to create hotspot.

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

#5 2024-11-02 20:49:38

seth
Member
Registered: 2012-09-03
Posts: 59,216

Re: Failed to create hotspot.

I barely pointed into the relevant direction smile
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

Board footer

Powered by FluxBB