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
Forum & Wiki Admin
From: .nz
Registered: 2009-05-09
Posts: 18,345
Website

Re: How to give user permission to network interface?

man visudo


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

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

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

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
Forum & Wiki Admin
From: .nz
Registered: 2009-05-09
Posts: 18,345
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  •   Github

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: 5,661

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.


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

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

jasonwryan
Forum & Wiki Admin
From: .nz
Registered: 2009-05-09
Posts: 18,345
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  •   Github

Registered Linux User #482438

Offline

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

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,661

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.


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

Board footer

Powered by FluxBB