Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 07-16-2004, 06:52 PM   #1
LQ Newbie
Registered: Jun 2004
Distribution: Slackware
Posts: 25

Rep: Reputation: 15
How to make ppp scripts run as user

I can only run them as root. It says command not found when i type pppsetup as user. I dont want to mess my file permissions and other things. What exactly should i do.
Old 07-17-2004, 02:03 AM   #2
Amigo developer
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,855

Rep: Reputation: 547Reputation: 547Reputation: 547Reputation: 547Reputation: 547Reputation: 547
Well, since pppsetup is not in the users path you could call it with the full path:
/usr/sbin/pppsetup. However, the first thing pppsetup does is find out if you are 'root' an di fnot it will warn you and quit.
to runn commands as root without having to logout and back in use 'sudo'
just type 'sudo /usr/sbin/pppsetup'
However, you'll find that pppsetup will not give permission for users to dial out. You'll have to chmod some files after running pppsetup.
chmod 6755 /usr/sbin/ppp-on, ppp-go, ppp-off, ppp-stop, and pppd
Then chmod 644 /etc/ppp/options and /etc/ppp/pppscript
and chmod 600 /etc/ppp/pap-secrets or (chap-secrets)
This should let users dial out without sudo-ing.
Old 07-17-2004, 05:42 AM   #3
LQ Newbie
Registered: Apr 2003
Distribution: Slackware 10.0
Posts: 28

Rep: Reputation: 15
You could if you have kdesu and kde installed run it with kdesu /usr/sbin/pppsetup and kdesu will do the hard work for you. It's a bit of a hack but I have read kdesu to be quite secure and it should dial out OK. I have used it in this way for a modem and adsl conection.
Old 07-17-2004, 07:35 AM   #4
Registered: Sep 2003
Location: Arizona
Distribution: Kubuntu 8.04
Posts: 202

Rep: Reputation: 30
I tried what gnashley suggested and it worked great. I had been wondering how to do that and was getting tired of using the su command. One little detail that I noticed is that I do need to use the full path in front of the command before it will work. Typing /usr/sbin/ppp-go works but just using ppp-go does not. How could I avoid having to type the full path in front of the command every time I use it? Should I create a symbolic link to each of commands from somewhere like /usr/local/bin. If I do that what permissions and ownerships should I use for the symbolic links. Is there some better way to avoid having to enter the full path each time?

I might also create a launcher with an icon for ppp-go and ppp-stop on either the upper or lower panel or possibly on the desktop. I suppose I could also add a launchers for those scripts to the Internet portion of the applications menu. Thanks for the solution for how to avoid having to use the su command every time I want to access the Internet.
Old 07-17-2004, 07:46 AM   #5
Registered: Sep 2003
Location: Czech Republic - Prague
Distribution: Slackware 9.1
Posts: 61

Rep: Reputation: 15
add /usr/sbin in your $PATH (look in /etc/profile file)
Old 07-17-2004, 08:56 AM   #6
Registered: Sep 2003
Location: Arizona
Distribution: Kubuntu 8.04
Posts: 202

Rep: Reputation: 30
OK, adding /usr/sbin to the path like you suggested solved that. I hope all this also works for Grunty who originally started the thread.
Old 09-13-2005, 08:54 PM   #7
Registered: Jan 2004
Distribution: PCLinuxOS .93, Puppy
Posts: 82

Rep: Reputation: 15
Thank you, gnashley!!!! I had been looking for this answer for a long time and was directed to this thread by kodon. It works like I want it to work. I think I learned something today and your help is very much appreciated!


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Cannot run 'make menuconfig' as user CowboyJ Linux - Newbie 1 09-17-2004 11:00 PM
how do I make sure that the user that is going to run the script is a root user??? nikold01 Linux - General 3 09-10-2004 07:54 AM
how can i run a shell scripts (or a number of commands )when a user logs in to a linu rddreamz Programming 4 05-20-2004 03:08 PM
how to make/run startup scripts/commands ViN86 Slackware 3 04-24-2004 10:02 AM
How do i make scripts run at bootup and shutdown? BajaNick Linux - General 2 08-11-2003 08:37 PM > Forums > Linux Forums > Linux - Distributions > Slackware

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

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