Must be logged in as root to dial my modem

Posted on 2000-01-31
Medium Priority
Last Modified: 2010-04-20
Friends, i have a script file that establishes a ppp connection.  It works very well, but i have to be logged in as root.

When i try the script logged in as a simple mortal man, i get an error message saying "can't find ppp".
Question by:oizagas

Author Comment

ID: 2476772
Adjusted points to 15
LVL 12

Expert Comment

ID: 2477326
are you using absolute or relative paths? How does the script look? What are the permissions set like for all components?

Expert Comment

ID: 2477773
You should set it up for demand dialing. As soon as a packet is sent, pppd will automatically dial to the ISP.

 Here's the URL where you'll find a copy of my Demand-Dialing-HOWTO:

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.


Expert Comment

ID: 2478438
On some systems you need pppd to be run as root. You can allow other users to run pppd but using the setuid bit.

The other problem could be with the path enviroment being different do

echo $PATH

as both user & root and compare.

Expert Comment

ID: 2478577
Giving processes the suid bit isn't safe. The demand dialing processed that is full managed by a daemonized pppd is the best solution for allowing normal users to access the Internet. Not to mention it's pretty comfortable to access the Internet with demand dialing.

Expert Comment

ID: 2495311
I would set a special group to own the modem then put yourself in it. that should helps.

Second, using 'sudo' package to allow a specified ordinary user/group to do a specified subset of things only root can do. It should be safer than setuid.

Accepted Solution

ohad23 earned 30 total points
ID: 2521726
Or, you can do a chmod +s `which pppd` as root. this will give the ppp daemon the root privileges when a normal user runs it.

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Welcome back to our beginners guide of the popular Unix tool, cron. If you missed part one where we introduced this tool, the link is below. We left off learning how to build a simple script to schedule automatic back ups. Now, we’ll learn how to se…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses

594 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question