You are not logged in.

#1 2013-01-20 20:00:02

brandon88tube
Member
Registered: 2009-11-06
Posts: 84

How to give user permission to network interface?

I'm trying to give a user permission to use wpa_supplicant on wlan0 so I don't have to log into root to bring up my wireless all of the time. (Yeah, I have yet to set up a script to do wpa_supplicant and then run dhcpcd...)

Offline

#2 2013-01-20 20:01:22

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: How to give user permission to network interface?

man visudo


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2013-01-20 20:05:40

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: How to give user permission to network interface?

Just use netcfg.

Offline

#4 2013-01-20 20:13:06

brandon88tube
Member
Registered: 2009-11-06
Posts: 84

Re: How to give user permission to network interface?

jasonwyran, I don't have a manual entry for visudo probably because I don't have sudo installed. tomk, no offense I don't feel like using netcfg at the moment and that really isn't answering my question.

Offline

#5 2013-01-20 20:20:19

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: How to give user permission to network interface?

The standard way to give a user temporarily elevated permissions (and to restrict those premissions to specific commands) is sudo. Without using sudo, your other options are to use a tool that manages it for you, like netcfg or wicd, or I don't know--probably script it yourself.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#6 2013-01-20 20:24:01

brandon88tube
Member
Registered: 2009-11-06
Posts: 84

Re: How to give user permission to network interface?

What if I didn't want them to be temporary, but permanent or am I completely misunderstanding how this works?

Offline

#7 2013-01-20 20:34:42

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,130

Re: How to give user permission to network interface?

I think "temporary" in this context means "for the purpose of running a particular command" and not "for a week or so". The fact that you want to make it permanent in the time sense doesn't change the fact that you want it to be temporary in the restricted sense. That is, you want a normal user to have elevated privileges just while running the relevant command(s) to bring up the network. You don't want everything the user does from then on to be done with superuser privileges.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#8 2013-01-20 20:41:37

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: How to give user permission to network interface?

Temporary as in time and command based. See man sudoers:

sudoers uses time stamp files for credential caching.  Once a user has been authenticated, the time
     stamp is updated and the user may then use sudo without a password for a short period of time (5
     minutes unless overridden by the timeout option).


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#9 2013-01-20 21:01:09

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,130

Re: How to give user permission to network interface?

Yes. I didn't explain very well. But it is not "temporary" as opposed to "permanent" in the sense of being a configuration change of definitely limited duration as opposed to being a configuration change which will alter the way the system behaves indefinitely. The effect of sudo may be temporary (where a password is required) but the effect of the configuration change is permanent.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

Board footer

Powered by FluxBB