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.
|
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. |
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.
|
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. |
add /usr/sbin in your $PATH (look in /etc/profile file)
|
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.
|
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!
|
All times are GMT -5. The time now is 01:37 PM. |