friedrith / node-wifi

📶 NodeJS tool to manage wifi (connections, scans)
MIT License
399 stars 161 forks source link

Only work with sudo in linux #10

Closed sn0opr closed 5 years ago

sn0opr commented 7 years ago

I can't connect to wifi without sudo permission on Ubuntu 14.04, here is the message I get :

Error: Failed to add/activate new connection: (32) Not authorized to control networking.

friedrith commented 7 years ago

Quite weird! It worked well with my Ubuntu. Unfortunately, I have recently switch to Fedora so I cannot test anymore on Ubuntu. Try to use directly nmcli in command line to check if you need sudo for it : nmcli -f all -m multiline dev wifi list iface <interface>.

If it is the case, you may look like in your graphical settings, if all users are authorized to connect wifi. Otherwise, you can update the file sudoers in order to authorize the command nmcli for everybody without password.

wga22 commented 7 years ago

You will likely need to run this as a user that has rights to modify the network settings; makes sense that only works as root.

friedrith commented 7 years ago

But in the same it is totally against all security rules to start a node process with root priviledges so we should find an other solution. Moreover, I don't need to use my root password to connect to a new wifi network with a UI like gnome for example so it must be a way to give the privilegdes to simple user to create connection. It be related to sudoers file.

logidelic commented 6 years ago

FWIW, I'm currently testing with Ubuntu 17 and my process does not need root priviledges for node-wifi to work correctly...

friedrith commented 3 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.