PDA

View Full Version : User privaleges to shutdown, control net devices



MorskNorsk
07-06-2003, 12:45 PM
I'm loving Knoppix a lot, but being new to Debian there are two things I can't figure out how to do. I asked on a #debian but the answer seemed rather complex and I couldn't find anything on google.

I want to allow a regular user account (mine in this case) to be able to shutdown and do ifup and ifdown commands to bring up interfaces. How would I go about doing this the Debian way? I know I can use sudo or just su to root, but it's bothersome to type my password all the time for that (I'm using a notebook). I tried to change the owner / group of /etc/network/interfaces, but then pump complained. Any ideas?

rickenbacherus
07-06-2003, 04:20 PM
As root:


chmod 777 /etc/network/ifstate

Also- you might want to edit your /etc/sudoers file so that it looks like so:


<your username> ALL=NOPASSWD: ALL

That way when you use the sudo command you won't have to enter a password everytime. After that, you can do sudo ifdown -a and it will just do it- no password required.

MorskNorsk
07-07-2003, 03:07 AM
Changing the octal mode of /etc/network/ifstate didn't help at all :( - pump still complained that it must be run as root. Changing the /etc/sudoers worked great though! Thanks :)