We help IT Professionals succeed at work.

Giving Access to PPP

jgb
jgb asked
on
296 Views
Last Modified: 2010-03-18
Ok you guys came thru for me on the first PPP question...now i got another one.  At this moment i can only use PPP to dial in when i am logged in as root. How do i give my other user account access so i dont have to log in as root all the time?
Comment
Watch Question

Commented:
Hi.

To make ordinary users able to start a ppp-connection
(and kill it again I presume) you have many options.  

Two and a half ways are listed below. notice that they both
allow the
ppp-controlling people access to the userid/password combination
for the remote ppp-host which might be in one of your
ppp-scripts.  On most pc's that hardly a worry, as the are
used just by the family.

If EVERYBODY should be allowed to run/stop ppp just do a
"chmod" to whatever file/device
your particular ppp setup is using. The new setting for the
users can either be equal to that of root's current setting
or you can just to "chmod 755 ppp-related-files"  The typical
ppp-related-files are in /usr/sbin with names starting with ppp
and in /etc/ppp with all types of names.  You might also have
to change the chmod settings of the device which is used
by the modem.   This is the fast and dirty method I'm currently
using  my pc - not to be officially recommended, ha ha...

If you want only certain users to start/stop ppp one way is
to run it as a "sudo" command. That means you type
"sudo ppp-start-script" where ppp-start-script is the
ppp-starter which currently works for you as root.  This makes
linux chek in the file /etc/SUDOERS whether you should be allowed start ppp and prompt you for your password (yours, not
roots) before doing so.  Like you have root-abilities but only for clearly specified stuff.
Clearly you'll have to edit first the
SUDOERS file. Go to /etc issue "visudo SUDOERS" and fill in
following either the sceleton which is already there or the
guidelines from the manual-page. Notice - you have to edit
the file using the "visudo" editor. When you are finished
the SUDOERS file will contain a small list of files necessary
to start/stop ppp (e.g. the ppp-starting-script and ppp-stoping-script), this list will have a certain name, and
that name will be associated with a list of users who will
then be allowed to run those scripts/programs if they
issue commands like "sudo script"  I used this setup for
a long time, works fine, until I got some button-popup ppp-tools,
which made invoking the password prompting rather cumbersome.


I think, but have not tried, that one can reach the same goal
as above by adding the users who should be able to control
the ppp-connection to the group to which the ppp-files belong,
and eventaully change the protections for this group on the
relavant files in a selective manner.
 
jgb

Author

Commented:
i did what he said and still no go...

Commented:
There was a mistake in my recommendation:

If you use the sudo option the file to edit is
/etc/sudoers NOT /etc/SUDOERS as I wrote.  here is the
content of my own /etc/sudoers file
 
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for the details on how to write a sudoers file.
#
# Host alias specification
Host_Alias BALD=baldeagle.skouvedel.dk,baldeagle
# Cmnd alias specification
Cmnd_Alias REMOTE=/usr/sbin/ppp-on-tac,/usr/sbin/ppp-on-nbi,/usr/local/bin/tkppp
tac,/usr/local/bin/tkpppnbi
Cmnd_Alias SHUT=/sbin/halt,/sbin/shutdown
Cmnd_Alias WWW=/usr/sbin/httpd
# User specification
root    ALL=(ALL) ALL
vedel   BALD=REMOTE:BALD=SHUT:BALD=WWW  
dorthe  BALD=REMOTE:BALD=SHUT:BALD=WWW


In any instant you should also do the following as root.
"chmod 4755 /usr/sbin/pppd"

If it still doesn't work, please specify precisely what you
did and what eventual errormessages were.

good luck.
jgb

Author

Commented:
i keep getting errors in the sudoer file when i try to save what
i have done in it......here is my info if it will help....my local host is black....local domain is pearljam.net......the users i want to give access to are lonegun and mulder.....the command to start up my ppp connection is in /usr/sbin and is ppp-go.....not sure what the command the stop it is....i have just been killing the processes when i am done...but i am sure there is another way.

Commented:
What errors does visudo give you when you try saving the
sudoers file?

In your case it should look something like:

#Host alias specification
Host_Alias MYPC=black.pearljam.net,black
#
#Command alias specification
Cmnd_Alias REMOTE=/usr/sbin/ppp-go
#
#User specification
root ALL=(ALL)ALL
lonegun MYPC=REMOTE
mulder MYPC=REMOTE

I recently updated from an older Slackware installation to
a redhat 4.2, and I recall having to change the sudoers file
slightly. The line about root wasn't my the slackware sudoers file. The above it the structure with would work on my redhat
linux installation.

For this to work your linux system should work properly
with the netaddress specified, at least "within itself"
Check if you can do "telnet black" and "telnet black.pearljam.net" to see if the pc recognizes itself under
those names (without running the ppp-connection).

yet another good luck.

jgb

Author

Commented:
ok i got an error message from the sudoer file......"sudoers
file: parse error, Line 9...what now?"...dats da error
jgb

Author

Commented:
ok i figgered somethin else out....thanks for the help anyway vedel.
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.