How can I make a network kill-switch with Kdeconnect using Linux groups?

I want to register a kill-switch for my PC to disconnect from the network if someone starts a video chat or IP call suddenly at my house while ma downloading something big.

The command I want to run is dhclient -r and run it with with Kde Connect, Kde connect gives no errors while trying but the command doesn’t run and I tried sudo useradd -G network USER. Command output below.

sudo useradd -G network USER                                                                                                                                                                                             
useradd: user 'USER' already exists

What do you believe should happen? Did you use dhclient to set up your networking? Just releaseing the current lease and stopping dhclient will not kill your networking if you use NetworkManager or other programs to set up your networking.

Stop the service of the program you use to set up your networking.

1 Like

por ejemplo:
nmcli networking off
nmcli networking on

man nmcli o nmcli --help

Did you intend to reference the variable holding the currently logged in user?

And did you intend to add a specific user to the network group?

If yes then you forgot to indicate it is a variable $USER

And you are using the wrong commands for it

use usermod to modify a user e.g. adding the user to a group

For this you can also use gpassed -a $USER group

Or are you trying to add a new user?

TYVM Mr. Manyaro01

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.