?
Solved

Must be logged in as root to dial my modem

Posted on 2000-01-31
8
Medium Priority
?
256 Views
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".
0
Comment
Question by:oizagas
8 Comments
 

Author Comment

by:oizagas
ID: 2476772
Adjusted points to 15
0
 
LVL 12

Expert Comment

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

Expert Comment

by:EatEmAndSmile
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:

http://www.slackware.com/forum/read.php3?num=2&id=32375&thread=32375
0
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

by:Gyles
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.
0
 
LVL 2

Expert Comment

by:EatEmAndSmile
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.
0
 
LVL 3

Expert Comment

by:jyu_88
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.
0
 

Accepted Solution

by:
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.
0

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