[techtalk] using ppp as non root user

Sean McAfee mcafee at umich.edu
Fri Nov 19 12:30:18 EST 1999


Matthias Holschneider <Matthias.Holschneider at univ-rennes1.fr> wrote:
>After successful installation of the ppp software and my modem I am faced
>with the following problem: I want to open the ppp connection as a non
>root user and use internet programs like netscape, telnet, ftp ... .
>For the moment I have two possibilities to do so.

>1) I can as normal user use minicom to log into the remote ppp server.  Now
>leaving minicom without killing the daemon pppd I can use my connection.

>2) as root I can lance the ppp-on script in the background and I am set.
>I would like to be able to lance as normal user some script that does all
>the dialing in for me and sets up the ppp connection readt to use some
>internet applications. In particular I do not want to communicate my login
>and password for the ppp server to all normal users.

Several months ago, I had to upgrade my PPP daemon for some forgotten
reason, and I ran into the same difficulty.  I examined the source, and
determined that the daemon would not initiate a connection unless the
person running the program was root--really and truly root, not just
setuid root.  So, I just commented out the portion of the code that
performed the check; it was easy to find and looked something like the
following:

if (getuid() != 0)
    restricted_mode = 1;

Then I recompiled, reinstalled, and all was well.  That's the beauty of
free software.

-- 
Sean McAfee | GCS d->-- s+++: a27 C++ US+++ P+++$ L++ E- W+ N++ |
            | K w--- O? M- V-- PS+ PE Y+ PGP?>++ t+() 5++ X R+  | mcafee@
            | tv+ b++ DI++ D+ G e++ h r---* y+>++               | umich.edu

************
techtalk at linuxchix.org   http://www.linuxchix.org




More information about the Techtalk mailing list