Starting/stopping PPP as normal user (RH 4.0)

Starting/stopping PPP as normal user (RH 4.0)

Post by Someon » Mon, 16 Dec 1996 04:00:00



Is it possible to start and stop PPP as a normal user? I tried creating
a script like this:

#!/bin/sh
exec /etc/sysconfig/network-scripts/ifup
/etc/sysconfig/network-scripts/ifcfg-ppp0

and called it start-ppp; and another one called stop-ppp with "ifdown"
instead of "ifup". So far, so good, as long as you're root, but appar-
ently you can't chmod 4755 this thing and then run it as a user.
*Is* there a way to do this?

 - Thomas.

--
NOTE:  The address in the message header is bogus. This is a deliberate

 
 
 

Starting/stopping PPP as normal user (RH 4.0)

Post by Masroor Faroo » Tue, 17 Dec 1996 04:00:00



>Is it possible to start and stop PPP as a normal user? I tried creating
>a script like this:

>#!/bin/sh
>exec /etc/sysconfig/network-scripts/ifup
>/etc/sysconfig/network-scripts/ifcfg-ppp0

>and called it start-ppp; and another one called stop-ppp with "ifdown"
>instead of "ifup". So far, so good, as long as you're root, but appar-
>ently you can't chmod 4755 this thing and then run it as a user.
>*Is* there a way to do this?

> - Thomas.

>--
>NOTE:  The address in the message header is bogus. This is a deliberate


I don't know if this answers your question or not, but to stop ppp, I just
kill the pppd process. To do this I wrote a small scriptthat does the
business. The general idea is to pipe ps -aux through grep and grep for pppd.
Then awk the process number. At this point you will get 2 pid (one for the
pppd process and one for your 'grep pppd' process). awk that again and get the
first pid. Then just kill it. As you started this process as yourself, you can
kill it yourself.

If you'r script writing skills are kinda rusty let me know and I will send you
my script (I'm currently in Windoze so cannot get to that script).

Hope this helps....

Masroor Farooqi

Keep the Linux spirit alive !!!

 
 
 

1. How should I start PPP as a normal user?

I have a script to start PPP. However, the script only has execute
permission for root. Should I just give normal users (I am the only
user) execute permission, or (for security reasons) should I become
superuser whenever I want to execute the script? And how should I get
PPP to start whenever I log in as a normal user? Thanks.

--

Russ Paielli
http://www.geocities.com/CapeCanaveral/Lab/9488/

2. Question: Specify params for Promise card disables ethernet!?

3. Problems using kppp as a normal user with RH 6.2

4. Linux/Perl module make test fails

5. Starting KDE as normal user

6. title in xterm

7. KDE refuse to start after 'startx' in normal user mode

8. copy on write links?

9. XFree does not start for normal users!

10. GNOME MC crashes when started as normal user

11. Normal users can't do PPP

12. ppp for normal users

13. RedHat 4.1, PPP & normal users