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