LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 11-08-2005, 12:50 AM   #1
ekdya
Member
 
Registered: Oct 2003
Posts: 280

Rep: Reputation: 30
$ifdown and up for a user rights


Hello
using testing/2.6.13
is there a way to give a user the rights to #ifdown/ifup a eth0 for my
adsl modem/router to pon and poff the Internet connection?
somthing like adding a user to a dialup group for pon for example?


thanks
 
Old 11-08-2005, 02:08 AM   #2
avatarfx
Member
 
Registered: May 2004
Posts: 34

Rep: Reputation: 16
Why don't you try the following:

1. Create a new group for those designated users (in my example, dialup) and add the users to that group.
2. Change the group to which the ifup and ifdown belongs, for example: #chown root:dialup `which ifup`;chown root:dialup 'which ifdown'
 
Old 11-08-2005, 03:22 AM   #3
ekdya
Member
 
Registered: Oct 2003
Posts: 280

Original Poster
Rep: Reputation: 30
I did all I can but I am not able to use ifup/ifdown as a user, note;

[/home/sam] ls -l !$
ls -l /sbin/if*
-rwxr-xr-x 1 root root 58380 Jul 1 05:52 /sbin/ifconfig
-rwxr-xr-x 2 root dialout 26400 May 3 2005 /sbin/ifdown
-rwxr-xr-x 1 root root 3852 Apr 4 2002 /sbin/ifport
-rwxr-xr-x 2 root dialout 26400 May 3 2005 /sbin/ifup
-rwxr-xr-x 1 root root 4716 Apr 4 2002 /sbin/ifuser
[/home/sam] groups sam
sam : sam dialout cdrom floppy audio dip src
[/home/sam] exit
exit
sam@das:~$ ifup eth0
bash: ifup: command not found
sam@das:~$ /sbin/ifup eth0
/sbin/ifup: failed to open statefile /etc/network/run/ifstate: Permission denied
sam@das:~$ su
Password:
[/home/sam] ls -l /etc/network/run/ifstate
-rw-r--r-- 1 root root 6 Nov 8 20:13 /etc/network/run/ifstate
[/home/sam] chown root:dialout /etc/network/run/ifstate
[/home/sam] exit
exit
sam@das:~$ ifup eth0
bash: ifup: command not found
sam@das:~$ /sbin/ifup eth0
/sbin/ifup: failed to open statefile /etc/network/run/ifstate: Permission denied
sam@das:~$ su
Password:
[/home/sam] ls -l /etc/network/run/ifstate
-rw-r--r-- 1 root dialout 6 Nov 8 20:13 /etc/network/run/ifstate
[/home/sam] ifup eth0
connects ok
 
Old 11-08-2005, 03:59 AM   #4
avatarfx
Member
 
Registered: May 2004
Posts: 34

Rep: Reputation: 16
Ok... seems good, just check that you changed the ifup group (which is good) but the permissions on /etc/network/run/ifstate are Read-Write for owner (root) but still just read for group (should be Read-Write as well).
 
Old 11-08-2005, 04:33 AM   #5
ekdya
Member
 
Registered: Oct 2003
Posts: 280

Original Poster
Rep: Reputation: 30
ok,
I did it but I am having some problems

(1)
sam@das:~$ /sbin/ifdown eth0
/sbin/ifdown: interface eth0 not configured

(2)
as root#
ifdown eth0
ifdown: interface eth0 not configured
addgroup root dialout
Adding user `root' to group `dialout'...
Done.
[~] ifdown eth0
ifdown: interface eth0 not configured
[~] /sbin/ifdown eth0
/sbin/ifdown: interface eth0 not configured

Last edited by ekdya; 11-08-2005 at 04:37 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
vsftpd user rights compughnet Linux - Software 0 11-09-2005 12:02 PM
user rights for WINE KrazyGandhi Linux - Software 7 02-25-2004 01:31 PM
Giving a user rights Help!!! Sabeer Linux - Newbie 1 08-25-2003 12:02 AM
Squid proxy with user authentication and user rights duvanhorn Linux - Networking 0 08-07-2003 03:40 AM
User rights rcoman Linux - Networking 2 04-21-2003 12:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 03:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration