LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-03-2003, 03:24 AM   #1
carlos123
LQ Newbie
 
Registered: Jan 2003
Posts: 22

Rep: Reputation: 15
Allowing regular user to restart network process??


For some reason whenever me or other users log out and then back in to our KDE desktops on my computer the Internet goes down and must be restarted manually.

Now regular users can't normally do that. Since it's my computer I just su to root and do it for myself when I am logged in as my regular user (who has su'ing privaleges).

I would like to let other users (like my wife and daugher) just run a script that restarts the network with the line "/etc/init.d/net.eth0 restart" running under Gentoo linux.

But unless a user su'es to root such a script won't work. Since only a su'ed root user can normally restart processes. I don't want to make my wife and my daughter members of the wheel group which can su to root since they don't know what they are doing under Linux and might mess something up if made a member of that group.

Is there a way to give regular users the ability to restart just this ONE process? Namely the network? Without su'ing to root? All that they care or need to do so?

Any general suggestions as to how I might be able to do this would be greatly appreciated. I've never been able to figure out why the network goes down between logins so I figure a little script to restart it is the best and easiest way to let my wife and daugher restart the network.

Thanks.

Carlos
 
Old 12-03-2003, 03:40 AM   #2
binkybuckle
Member
 
Registered: Jul 2003
Distribution: debian
Posts: 40

Rep: Reputation: 15
you could have the linux computer just dial everytime on bootup by adding a bootup script. Or maybe have a script written that su's in and out of root just to run that command (I have never done this option before though).
 
Old 12-03-2003, 03:44 AM   #3
Y0jiMb0
Member
 
Registered: Jul 2003
Location: Valencia (Spain)
Distribution: slackware 11, FEDORA CORE 4, RHEL3, Gentoo...
Posts: 361

Rep: Reputation: 30
Hi!
I'm going to explain what happens in my system; I hope it helps you (it could be not exactly the same in your case)
When my computer begins the "default runlevel" (which is "4", for X11) it calls to "/etc/rc.d/rc.M"; there are a couple of lines telling:
Code:
# Initialize the networking hardware.  If your network driver is a module
# and you haven't loaded it manually, this will be deferred until after
# the hotplug system loads the module below.
if [ -x /etc/rc.d/rc.inet1 ]; then
  . /etc/rc.d/rc.inet1
fi
so, if the file "/etc/rc.d/rc.inet1" exists and is executable, it runs. And this is the script which starts and stops the network.

Regards
 
  


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
kill/restart process pass Linux - General 24 02-23-2006 04:45 PM
login regular but start a server process automatically after reboot powah Linux - Newbie 6 05-24-2005 07:21 AM
Does kill -HUP <id> restart the <id> process? feetyouwell Linux - Software 1 02-15-2004 10:48 PM
restart a process mum_03 Linux - General 7 04-21-2003 02:37 PM
allowing regular users to shut down abyss Linux - General 1 08-30-2002 12:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:05 PM.

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