From owner-freebsd-questions Thu Jun 1 13:18:39 2000 Delivered-To: freebsd-questions@freebsd.org Received: from corinth.bossig.com (corinth.bossig.com [208.26.239.66]) by hub.freebsd.org (Postfix) with ESMTP id 7122E37B568 for ; Thu, 1 Jun 2000 13:18:34 -0700 (PDT) (envelope-from kstewart@3-cities.com) Received: from 3-cities.com (unverified [208.26.241.209]) by corinth.bossig.com (Rockliffe SMTPRA 4.2.1) with ESMTP id ; Thu, 1 Jun 2000 13:19:02 -0700 Message-ID: <3936C502.1539E947@3-cities.com> Date: Thu, 01 Jun 2000 13:18:10 -0700 From: Kent Stewart Organization: BOSSig (BOSS Internet Group) X-Mailer: Mozilla 4.73 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Duke Normandin Cc: freebsd-questions@FreeBSD.ORG Subject: Re: How to close a ppp connection? References: <000801bfcbbf$be8d8140$10dba7d1@odie> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Duke Normandin wrote: > > On Wednesday, May 31, 2000 11:24 PM Kent Stewart > wrote: > > >Duke Normandin wrote: > >> > >> On Tuesday, May 30, 2000 9:02 PM Kent Stewart wrote: > >> > >> >Duke Normandin wrote: > >> >> > >> >> On Tuesday, May 30, 2000 6:49 PM Salvo Bartolotta > >> wrote: > >> >> > >> >> >> Background: 3.3R on a standalone box > >> >> > > >> >> >> ppp / lynx are working great, except that I don't know (read , can't > >> >> >find) > >> >> >> how to shutdown a connection when I'm through. I use > >> >> >`/etc/start_if.tun0` > >> >> >> which contain `ppp -auto my_isp` to bring ppp up at boot-time. As it > >> >> >is, > >> >> >> I have to wait for `set timeout = 300` to kick in, or use `kill -HUP > >> >> >"ppp pid" > >> > >> [snipped for brevity] > >> > >> >Read about pppctl. Then add a local domain socket to your ppp.conf. > >> >Then, all you have to do is tell it to close. You can setup shell > >> >scripts to do the commands. I even have one for "quit all" which shuts > >> >ppp down nicely. > >> > >> Things work well when a person knows what to look for ;) I also searched > >> the archives and found your previous posts re: pppctl to "flesh out" the > >> above hints. I have a further question which concerns using `pppctl` as > >> a normal user. I noticed that I'm not able to "get a status" or "hangup" > >> (I have aliases set up) unless I frist `su`. It seems a long-way around > >> to kill a connection (from lynx, e.g.). Is the the normal way of doing > >> things? I have set myself up in the wheel group (among others), so I > >> thought that I would be able to use `pppctl` as "myself". In ppp.conf > >> I also have: > >> > >> default: > >> allow users dnormandin > >> > >> Am I missing something -- or I should say *what* am I missing? Tia.... > > > >I think you will find that your local domain socket, i.e., > >/var/run/internet or what ever you called it, has 544 privaledges for > >root and wheel. If you auto start it, it will be owned by root. I > >don't know any way around that. > > So if I abandonned auto-starting ppp, and ran it as a normal user via a > sh script, could that solve the problem? And speaking of these sh scripts > (e.g. -- the ones to "use" pppctl ) , ideally where should they live? I have no experience doing user-ppp as a user. I only run them as root and have a /root/bin directory that was added for root. I add root stuff such as my .sh scripts into the bin directory. You could try them as your user and create a /home/user/bin, add it to your path, and see what happens. I auto start ppp and will su to shut my system down. I'm hardly ever on the machine doing the ppp connection and it is a telnet session to begin with. My ISP shuts me down at 8 hours of connect and I usually drop and redial ppp so that I have a 8 hour session to begin a LONG download. You feel kind of foolish when you get up and only have 1 hour of download time before they dropped and killed the ftp session :). Kent > > -duke > Calgary, AB -- Kent Stewart Richland, WA mailto:kstewart@3-cities.com http://www.3-cities.com/~kstewart/index.html FreeBSD News http://daily.daemonnews.org/ SETI(Search for Extraterrestrial Intelligence) @ HOME http://setiathome.ssl.berkeley.edu/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message