Is there a way to start "PPP" without being root ?
Thanks in advance
Santosh
Another option is to use sudo, which allows users to execute programsQuote:> Give root setuid to pppd. chmod 4711.
Doug.
chmod the pppd file to 4777.
That is what I did and it worked !!!!!!
Rgds,
Robert
>Santosh
Very simple, try chmod +s /usr/sbin/pppd
also, any scripts need to be user executable.
Dean
/* ppp.c -- PPP control by mortals by Phil Hughes
* -- 12-28-96 */
* Published May 1997
/*
* Call with one argument:
* on -- start PPP
* off -- stop PPP
* Install owned by root.
* If you want anyone to be able to run it, set
* permissions to 4711
* If you only want a set of users to be able to
* run it: chgrp it to the group that should be
* able to run it and set permissions to 4710
*/
#include <stdio.h>
#include <strings.h>
/* define strings for what needs to be run */
#define PPP_ON "/etc/ppp/ppp-on" /* turn PPP on */
#define PPP_OFF "/etc/ppp/ppp-off" /* turn PPP off */
/* just for safety, set a sane search path */
char *env[] = {
"PATH=/bin:/usr/bin:/usr/sbin/",
NULL};
int main(int argc, char *argv[])
{
/* must be called with an argument */
if (argc != 2)
{
fprintf(stderr,
"Usage: %s: {on|off}\n", argv[0]);
exit(1);
}
setuid(0); /* become root */
if (strcmp(argv[1], "on") == 0)
{
execle(PPP_ON, (const char *) NULL,
&env);
}
else if (strcmp(argv[1], "off") == 0)
{
execle(PPP_OFF, (const char *) NULL,
&env);
}
else
{
fprintf(stderr, "%s: invalid argument\n",
argv[0]);
exit(2);
}
}
--
Steve
> Another option is to use sudo, which allows users to execute programs
> as root. Each user can be allowed or denied permission to execute
> specific programs as root. It also doesn't have the security risks
> associated with suid root programs.
--
. _\\__[oo from | Phones: +44 121 471 3789 (home)
. l___\\ /~~) /~~[ / [ | PGP-fp: D7 03 2A 4B D8 3A 05 37...
# ll l\\ ~~~~ ~ ~ ~ ~ | http://wcl-l.bham.ac.uk/~bam/
--------------32454EE29EA22DAC5CCD58E5
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Check the permissions on
/etc/sysconfig/network-scripts/chat-ppp0
I continued to be plagued by the ppp-on ppp-off network scripts, I
finally added ppp0 at boot time and I am sad to admit that I have to
turn the modem off to disconnect the ppp session. Does any one know
what files /scripts should be disabled/enabled so that the ppp-on and
ppp-off scripts work properly. i.e. which of following are used for a
basic setup?
ppp-on
redialer
callback
ppp-off
ppp-on-dialer secure-card
ip-down
ip-down-part2
is ip-down the problem?
Thank you
Ismet
--
Manhattan Beach Physicians Medical Corp 310 939 7842
--------------32454EE29EA22DAC5CCD58E5
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<HTML>
<BLOCKQUOTE TYPE=CITE>Redhat 4.1 will only dial via netconfigurator when
I'm logged in as
<BR>root. Can anyone tell me why?</BLOCKQUOTE>
Check the permissions on
<BR>/etc/sysconfig/network-scripts/chat-ppp0
<P>I continued to be plagued by the ppp-on ppp-off network scripts, I finally
added ppp0 at boot time and I am sad to admit that I have to turn the modem
off to disconnect the ppp session. Does any one know what files /scripts
should be disabled/enabled so that the ppp-on and ppp-off scripts work
properly. i.e. which of following are used for a basic setup?
<P>ppp-on
<BR>redialer
<BR>callback
<BR>ppp-off
<BR>ppp-on-dialer secure-card
<BR>ip-down
<BR>ip-down-part2
<P>is ip-down the problem?
<P>Thank you
<P>Ismet
<PRE>--
Manhattan Beach Physicians Medical Corp 310 939 7842</PRE>
</HTML>
--------------32454EE29EA22DAC5CCD58E5--
2. Suspend fails with kernel 2.4.7 and 3com 905B (vortex_suspend?) (repost)
3. Starting PPP without root access
6. How to set IPC limits in Solaris 2.51
8. KDM or XDM is not coming up
10. Using PPP without root access?
11. Make a PPP connection without being root ?
12. ppp connect without root password
13. How to be root without looking like root!