From owner-freebsd-hackers Thu Feb 11 18:09:40 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA27253 for freebsd-hackers-outgoing; Thu, 11 Feb 1999 18:09:40 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from Loki.orland.u91.k12.me.us (Loki.orland.u91.k12.me.us [169.244.111.67]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id SAA27206 for ; Thu, 11 Feb 1999 18:09:20 -0800 (PST) (envelope-from netmonger@genesis.ispace.com) Received: from celeris (56k-port4014.ime.net [209.90.195.24]) by Loki.orland.u91.k12.me.us (8.9.3/8.8.8-Loki) with SMTP id VAA04222; Thu, 11 Feb 1999 21:08:19 -0500 (EST) (envelope-from netmonger@genesis.ispace.com) X-Server-ID: Loki.orland.u91.k12.me.us, OCSNet - Orland Maine USA X-Coord-Name: Drew "Droobie" Baxter, OneNetwork Exchange X-Coord-Addr: Droobie@Openlink.orland.me.us X-Coord-Pager: USA: 207-471-2719, http://pagedroo.orland.me.us Message-Id: <4.1.19990211210644.03b3da20@genesis.ispace.com> X-Sender: netmonger@genesis.ispace.com X-Mailer: QUALCOMM Windows Eudora Pro Version 4.1 Date: Thu, 11 Feb 1999 21:07:52 -0500 To: Chuck Robey , FreeBSD-Hackers@FreeBSD.ORG From: Drew Baxter Subject: Re: ppp server side startup commands In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG At 08:58 PM 2/11/99 , Chuck Robey wrote: >I was wondering if someone can make suggestion here, regarding getting >startup actions run, ON THE PPP SERVER. > >I run user-ppp, where the login is done via chap. The user never has to >enter any password; the getty process recognizes the incoming frame as >a ppp hdlc frame, and starts up a ppp process just fine. The login >works perfectly. > >The problem comes in when, for instance, the ppp user has a second box >that needs to be introduced into the routing. Manually, to do this, on >the server (as root) an arp -s command, and a route add command, has to >be run, then the second box (this is with static ip) works perfectly. >I've tried doing this with either the !bg or sh commands in ppp.linkup, >but those commands seem to be run with the user's permission level, and >the arp and route commands must be run as root. > >There are like commands (arp and route commands) that also have to be >run on ppp takedown, to eliminate the routes. Does anyone know how to >get this automated, so that it happens automatically on ppp startup and >takedown? > >Note that I said that !bg and sh aren't doing it, I think that their >permission levels are wrong. > Use Sudo to exec the bg commands. i.e. sudo -u root /sbin/route add ... Course this requires you to let someone run commands as root.. perhaps you could hack the source to add a password implementation. --- Drew "Droobie" Baxter Network Admin/Professional Computer Nerd(TM) OneEX: The OneNetwork Exchange, Bangor Maine USA http://www.droo.orland.me.us PGP DSS/1024 Public Key ID: 0x409A1F7D To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message