Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Jul 1997 09:25:39 -0400
From:      Chuck <crtb@capecod.net>
To:        questions@freebsd.org
Subject:   pppd
Message-ID:  <199707121325.JAA05298@localhost>

next in thread | raw e-mail | index | archive | help
I have a script, /usr/local/bin/pppgo, which dials my ISP via pppd.
Everything works except one thing.  When the line drops (the ISP
kills the line), ip-down runs, just as ip-up ran when connection
was first made.  It attempts to "route delete $IP" and the like,
but always gets:

route: must be root to alter routing table: Permission denied

even though TFM tells me that ip-down is run as root!  After all,
pppd is setuid root.
Any ideas?

Here's my ip-down:

#!/bin/sh
#	/etc/ppp/ip-down
Date=`date`
Int=$1; shift
Dev=$1; shift
Spd=$1; shift
LIP=$1; shift
RIP=$1; shift
rm -f /tmp/pppd.up
cat > /tmp/pppd.down <<EOF
Interface $Int on $Dev at $Spd is down on $Date
Local  IP was $LIP
Remote IP was $RIP
EOF
echo 'whoami = ' `whoami`
echo 'who am i = ' `who am i`
route delete $LIP
route delete $RIP
route delete default

And here's what I see when the line drops:

whoami =  root
who am i =  crtb ttyp1 Jul 12 09:20
route: must be root to alter routing table: Permission denied
route: must be root to alter routing table: Permission denied
route: must be root to alter routing table: Permission denied

        Chuck Bacon -- crtb@capecod.net
                ABHOR SECRECY -- DEFEND PRIVACY



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199707121325.JAA05298>