[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Allow my usual user reconnect to wifi without root pass and also replace
From: |
znavko |
Subject: |
Allow my usual user reconnect to wifi without root pass and also replace wpa config |
Date: |
Fri, 01 Jan 2021 19:07:16 +0000 |
Hello! Happy New Year, Guix Help!
I'd like to make my OS a bit comfortable for usual user.
I use only wpa_supplicant + dhclient without any utility that gives control
over wifi to usual users.
And I want to give such a control by my own hands and your advice.
Wi-fi connection sometimes is loosing, and the way to reconnect is to restart
hurd services.
I do it by root beautifully. I need to allow usual user to do this too.
With that task I also have two providers: wired ISP and Mobile ISP -
And I have such a script for choosing between them.
Attachment: wpa
So this script fulfill things of reconnection and changing wpa_supplicant.conf
very easy for root.
I want to allow to usual user just to run:
$ /wpa isp
and my script reconnect to wifi again.
I tried to give root privileges for user 'bob' to run script /wpa with this
line in /etc/sudoers:
# cat /etc/sudoers
root ALL=(ALL) ALL
%wheel ALL=(ALL) ALL
user ALL=(bob) NOPASSWD: /wpa
#groups bob
bob : users wheel video audio netdev
But I still have these error messages:
$ sudo -u bob /wpa isp
Connecting to ISP provider
cp: cannot create regular file '/etc/wpa_supplicant/wpa_supplicant.conf':
Permission denied
error: connect: /run/user/1000/shepherd/socket: No such file or directory
error: connect: /run/user/1000/shepherd/socket: No such file or directory
^X^C
$
Please, what to do here?
wpa
Description: Binary data
- Allow my usual user reconnect to wifi without root pass and also replace wpa config,
znavko <=