Subject: Re: Executing pppd as a non-root user
To: NetBSD-User <netbsd-users@netbsd.org>
From: Ian P. Thomas Ipt <ipthomas_77@yahoo.com>
List: netbsd-users
Date: 12/14/2001 13:02:10
--d6Gm4EdcadzBjdND
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Fri, Dec 14, 2001 at 12:49:03PM -0500, Ian P. Thomas Ipt wrote:
> 1.	I have tried and failed at getting pppd to run as a non-root user.  I
> have attached /etc/ppp/options and /etc/ppp/peers/ubunix who I believe are
> the culprits.  Other info that may be useful
> 
> Permissions of /etc/ppp/pap-secrets    0600
> 
> 2.	I am not able to get my ip-up script to run when the line comes up as
> well as my ip-down script to run when the line goes down.  Attached for
> your reading enjoyment.
> 
> Permissions of /etc/ppp/ip-up          0700
> 			   /etc/ppp/ip-down        0700
> 	
> 	I've been documenting the whole learning process and will put up a new
> user tutorial on my website when I have everything humming along.  Thanks
> for all the help so far.
> 
> Ian
> 
> -- 
> Of Course It Runs NetBSD 
> www.netbsd.org
> 
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
	
	The files should be attached this time.;)

Ian

-- 
Of Course It Runs NetBSD 
www.netbsd.org

--d6Gm4EdcadzBjdND
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=ip-down

#!/bin/sh

# Executed when the ppp link goes down.

echo The connection has ended.

if test -e /var/run/fetchmail.pid
then
	fetchmail -q
fi

--d6Gm4EdcadzBjdND
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=ip-up

#!/bin/sh

# Called by pppd when a link comes up

echo Starting fetchmail.

if test -f /var/run/fetchmail.pid 
then 
	fetchmail --daemon 900 --syslog --fetchmailrc /home/ipt/.fetchmailrc
fi

--d6Gm4EdcadzBjdND
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=options

# /etc/ppp/options
# Device used to communicate over. (Serial Port 1)
/dev/tty00

# Ensure exclusive access to /dev/tty00.
lock

# Use hardware flow control.
crtscts

# Set the maximum baud rate.
115200

# Use modem control lines.
modem

# Add a default route to the system routing tables, using the peer as the gateway.
defaultroute

# Peer supplys the IP address during IPCP negotiation.
noipdefault

# Read more options from the file /etc/ppp/peers/ubunix
call ubunix

# Require the peer to authenticate before allowing packets to be sent or received.
auth

--d6Gm4EdcadzBjdND
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=ubunix

# /etc/ppp/peers/ubunix

# Calls chat(1) to set up the serial line.
connect '/usr/sbin/chat -v -f /etc/ppp/peers/ubunix.chat'

# Do not require the peer (ISP's server) to authenticate.
noauth 

# The name used for authenticating the local system to the peer.
user ipthomas

# pppd(8) logs all control packets through syslog with facility daemon and level debug
debug

--d6Gm4EdcadzBjdND--

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com