* [gentoo-user] Allow a user to restart net.wlan0?
@ 2006-10-02 18:53 Mark Knecht
2006-10-02 19:38 ` Devon Miller
2006-10-03 9:50 ` [gentoo-user] " Alexander Skwar
0 siblings, 2 replies; 10+ messages in thread
From: Mark Knecht @ 2006-10-02 18:53 UTC (permalink / raw
To: gentoo-user
Hi,
We have a machine here, my son's, which runs Gentoo and uses (I
think) a D-Link 802.11abg NIC:
03:0a.0 Ethernet controller: Atheros Communications, Inc. AR5005G
802.11abg NIC (rev 01)
The setup uses ndiswrapper to load the Windows driver. For some
reason this NIC seems to go off line quite a bit - maybe once a day.
I'm assuming that this is caused by the Windows driver & ndiswrapper
having some sort of problem that is probably light years beyond my
ability to debug. However running /etc/init.d/net.wlan0 restart always
seems to get it going again.
How can I set up the system to allow my son to run this command
himself as a user? It appears that the script itself is runnable by a
user, but when we try it I get a message that only root can run init
scripts.
Sector9 ~ # ls -al /etc/init.d/net.*
lrwxrwxrwx 1 root root 6 Sep 16 10:14 /etc/init.d/net.eth0 -> net.lo
-rwxr-xr-x 1 root root 30341 Sep 16 10:27 /etc/init.d/net.lo
lrwxrwxrwx 1 root root 6 Jul 29 11:31 /etc/init.d/net.wlan0 -> net.lo
Sector9 ~ #
Is there an easy way to make this one script runnable by my son so
that when I'm not around he can get things going again?
On the other hand if there is an Open Source Linux driver for this
card I'd love to install that but I don't know of one.
Thanks,
Mark
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] Allow a user to restart net.wlan0?
2006-10-02 18:53 [gentoo-user] Allow a user to restart net.wlan0? Mark Knecht
@ 2006-10-02 19:38 ` Devon Miller
2006-10-02 19:58 ` Mark Shields
` (2 more replies)
2006-10-03 9:50 ` [gentoo-user] " Alexander Skwar
1 sibling, 3 replies; 10+ messages in thread
From: Devon Miller @ 2006-10-02 19:38 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1649 bytes --]
emerge app-admin/sudo
Edit /etc/sudoers and add:
username ALL= NOPASSWD: /etc/init.d/ner.wlan0
Where username is his login. To run it:
sudo /etc/init.d/net.wlan0 restart
dcm
On 10/2/06, Mark Knecht <markknecht@gmail.com> wrote:
>
> Hi,
> We have a machine here, my son's, which runs Gentoo and uses (I
> think) a D-Link 802.11abg NIC:
>
> 03:0a.0 Ethernet controller: Atheros Communications, Inc. AR5005G
> 802.11abg NIC (rev 01)
>
> The setup uses ndiswrapper to load the Windows driver. For some
> reason this NIC seems to go off line quite a bit - maybe once a day.
> I'm assuming that this is caused by the Windows driver & ndiswrapper
> having some sort of problem that is probably light years beyond my
> ability to debug. However running /etc/init.d/net.wlan0 restart always
> seems to get it going again.
>
> How can I set up the system to allow my son to run this command
> himself as a user? It appears that the script itself is runnable by a
> user, but when we try it I get a message that only root can run init
> scripts.
>
> Sector9 ~ # ls -al /etc/init.d/net.*
> lrwxrwxrwx 1 root root 6 Sep 16 10:14 /etc/init.d/net.eth0 -> net.lo
> -rwxr-xr-x 1 root root 30341 Sep 16 10:27 /etc/init.d/net.lo
> lrwxrwxrwx 1 root root 6 Jul 29 11:31 /etc/init.d/net.wlan0 -> net.lo
> Sector9 ~ #
>
> Is there an easy way to make this one script runnable by my son so
> that when I'm not around he can get things going again?
>
> On the other hand if there is an Open Source Linux driver for this
> card I'd love to install that but I don't know of one.
>
> Thanks,
> Mark
> --
> gentoo-user@gentoo.org mailing list
>
>
[-- Attachment #2: Type: text/html, Size: 2165 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] Allow a user to restart net.wlan0?
2006-10-02 19:38 ` Devon Miller
@ 2006-10-02 19:58 ` Mark Shields
2006-10-02 20:22 ` Mark Knecht
2006-10-02 20:31 ` Neil Bothwick
2 siblings, 0 replies; 10+ messages in thread
From: Mark Shields @ 2006-10-02 19:58 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 355 bytes --]
On 10/2/06, Devon Miller <devon.c.miller@gmail.com> wrote:
>
> emerge app-admin/sudo
>
> Edit /etc/sudoers and add:
>
> username ALL= NOPASSWD: /etc/init.d/ner.wlan0
>
> Where username is his login. To run it:
> sudo /etc/init.d/net.wlan0 restart
>
> dcm
Also, for best practice, I would suggest using visudo to edit /etc/sudoers.
--
- Mark Shields
[-- Attachment #2: Type: text/html, Size: 671 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] Allow a user to restart net.wlan0?
2006-10-02 19:38 ` Devon Miller
2006-10-02 19:58 ` Mark Shields
@ 2006-10-02 20:22 ` Mark Knecht
2006-10-03 0:27 ` Nick Rout
2006-10-02 20:31 ` Neil Bothwick
2 siblings, 1 reply; 10+ messages in thread
From: Mark Knecht @ 2006-10-02 20:22 UTC (permalink / raw
To: gentoo-user
On 10/2/06, Devon Miller <devon.c.miller@gmail.com> wrote:
> emerge app-admin/sudo
>
> Edit /etc/sudoers and add:
>
> username ALL= NOPASSWD: /etc/init.d/ner.wlan0
>
> Where username is his login. To run it:
> sudo /etc/init.d/net.wlan0 restart
>
> dcm
>
Thanks guys. I should have thought of sudo myself. I don't use it
much. With your help I'm now able to do what I needed to do.
Thanks,
Mark
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] Allow a user to restart net.wlan0?
2006-10-02 19:38 ` Devon Miller
2006-10-02 19:58 ` Mark Shields
2006-10-02 20:22 ` Mark Knecht
@ 2006-10-02 20:31 ` Neil Bothwick
2006-10-02 23:18 ` Iain Buchanan
2 siblings, 1 reply; 10+ messages in thread
From: Neil Bothwick @ 2006-10-02 20:31 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 698 bytes --]
On Mon, 2 Oct 2006 15:38:39 -0400, Devon Miller wrote:
> emerge app-admin/sudo
>
> Edit /etc/sudoers and add:
>
> username ALL= NOPASSWD: /etc/init.d/ner.wlan0
>
> Where username is his login. To run it:
> sudo /etc/init.d/net.wlan0 restart
A slightly more secure approach is to create a script to do what you want
the user to be able to do and add that to /etc/sudoers. Then you control
how the commands are executed as well as which commands.
You could put "/etc/init.d/net.wlan0 restart" in a script and give it a
desktop icon or toolbar button, so he can restart the network with a
mouse click.
--
Neil Bothwick
That's not a bug, it's a Free Enhanced Feature!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] Allow a user to restart net.wlan0?
2006-10-02 20:31 ` Neil Bothwick
@ 2006-10-02 23:18 ` Iain Buchanan
0 siblings, 0 replies; 10+ messages in thread
From: Iain Buchanan @ 2006-10-02 23:18 UTC (permalink / raw
To: gentoo-user
On Mon, 2006-10-02 at 21:31 +0100, Neil Bothwick wrote:
> On Mon, 2 Oct 2006 15:38:39 -0400, Devon Miller wrote:
>
> > emerge app-admin/sudo
> >
> > Edit /etc/sudoers and add:
> >
> > username ALL= NOPASSWD: /etc/init.d/ner.wlan0
> >
> > Where username is his login. To run it:
> > sudo /etc/init.d/net.wlan0 restart
>
> A slightly more secure approach is to create a script to do what you want
> the user to be able to do and add that to /etc/sudoers. Then you control
> how the commands are executed as well as which commands.
you can put arguments in the sudoers file. For example,
username ALL=(ALL) NOPASSWD: /etc/init.d/net.wlan0 start
would only allow "username" to start wlan0, but not stop / restart /
anything else.
(I would actually allow a restart, because sometimes my wlan0 goes down
and the only way to get it back is to stop and start it).
so for example, you could also say
username ALL=(ALL) NOPASSWD: /sbin/fdisk -l
which would allow username to run the safe fdisk -l, but not the unsafe
fdisk.
HTH,
--
Iain Buchanan <iaindb at netspace dot net dot au>
In the next world, you're on your own.
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] Allow a user to restart net.wlan0?
2006-10-02 20:22 ` Mark Knecht
@ 2006-10-03 0:27 ` Nick Rout
0 siblings, 0 replies; 10+ messages in thread
From: Nick Rout @ 2006-10-03 0:27 UTC (permalink / raw
To: gentoo-user
On 10/2/2006, "Mark Knecht" <markknecht@gmail.com> wrote:
>On 10/2/06, Devon Miller <devon.c.miller@gmail.com> wrote:
>> emerge app-admin/sudo
>>
>> Edit /etc/sudoers and add:
>>
>> username ALL= NOPASSWD: /etc/init.d/ner.wlan0
>>
>> Where username is his login. To run it:
>> sudo /etc/init.d/net.wlan0 restart
>>
>> dcm
>>
>
>Thanks guys. I should have thought of sudo myself. I don't use it
>much. With your help I'm now able to do what I needed to do.
>
>Thanks,
>Mark
I wonder if this could be avoided by using the madwifi[-ng] driver and
avoiding the windows thing altogether? I found it worked well, as does
the freebsd kernel driver.
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 10+ messages in thread
* [gentoo-user] Re: Allow a user to restart net.wlan0?
2006-10-02 18:53 [gentoo-user] Allow a user to restart net.wlan0? Mark Knecht
2006-10-02 19:38 ` Devon Miller
@ 2006-10-03 9:50 ` Alexander Skwar
2006-10-03 13:15 ` Mark Knecht
1 sibling, 1 reply; 10+ messages in thread
From: Alexander Skwar @ 2006-10-03 9:50 UTC (permalink / raw
To: gentoo-user
· Mark Knecht <markknecht@gmail.com>:
> How can I set up the system to allow my son to run this command
> himself as a user?
I'd have a look at sudo and set it up so, that your user can run
just this command.
> On the other hand if there is an Open Source Linux driver for this
> card I'd love to install that but I don't know of one.
If it's an Atheros card, I'd use the madwifi driver.
Alexander Skwar
--
All I kin say is when you finds yo'self wanderin' in a peach orchard,
ya don't go lookin' for rutabagas.
-- Kingfish
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] Re: Allow a user to restart net.wlan0?
2006-10-03 9:50 ` [gentoo-user] " Alexander Skwar
@ 2006-10-03 13:15 ` Mark Knecht
2006-10-03 16:51 ` [gentoo-user] " Alexander Skwar
0 siblings, 1 reply; 10+ messages in thread
From: Mark Knecht @ 2006-10-03 13:15 UTC (permalink / raw
To: gentoo-user
On 10/3/06, Alexander Skwar <listen@alexander.skwar.name> wrote:
> · Mark Knecht <markknecht@gmail.com>:
>
> > On the other hand if there is an Open Source Linux driver for this
> > card I'd love to install that but I don't know of one.
>
> If it's an Atheros card, I'd use the madwifi driver.
>
> Alexander Skwar
It's not clear (to me) that madwifi supports this card. It is Atheros
based but I do not spot the card on the madwifi page.
I'll continue to check it out but for now the sudo solution suggested
yesterday is up and running.
- Mark
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 10+ messages in thread
* [gentoo-user] Re: Re: Allow a user to restart net.wlan0?
2006-10-03 13:15 ` Mark Knecht
@ 2006-10-03 16:51 ` Alexander Skwar
0 siblings, 0 replies; 10+ messages in thread
From: Alexander Skwar @ 2006-10-03 16:51 UTC (permalink / raw
To: gentoo-user
· Mark Knecht <markknecht@gmail.com>:
> On 10/3/06, Alexander Skwar <listen@alexander.skwar.name> wrote:
>> · Mark Knecht <markknecht@gmail.com>:
>>
>> > On the other hand if there is an Open Source Linux driver for this
>> > card I'd love to install that but I don't know of one.
>>
>> If it's an Atheros card, I'd use the madwifi driver.
>>
>> Alexander Skwar
>
> It's not clear (to me) that madwifi supports this card. It is Atheros
> based but I do not spot the card on the madwifi page.
Where did you look?
It's listed on <http://madwifi.org/wiki/Compatibility> and it's listed
as being supported (at least the majority of reports there).
Alexander Skwar
--
Pecor's Health-Food Principle:
Never eat rutabaga on any day of the week that has a "y" in it.
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2006-10-03 16:57 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-02 18:53 [gentoo-user] Allow a user to restart net.wlan0? Mark Knecht
2006-10-02 19:38 ` Devon Miller
2006-10-02 19:58 ` Mark Shields
2006-10-02 20:22 ` Mark Knecht
2006-10-03 0:27 ` Nick Rout
2006-10-02 20:31 ` Neil Bothwick
2006-10-02 23:18 ` Iain Buchanan
2006-10-03 9:50 ` [gentoo-user] " Alexander Skwar
2006-10-03 13:15 ` Mark Knecht
2006-10-03 16:51 ` [gentoo-user] " Alexander Skwar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox