From owner-freebsd-isp Mon Aug 5 18:31:16 1996 Return-Path: owner-isp Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id SAA02993 for isp-outgoing; Mon, 5 Aug 1996 18:31:16 -0700 (PDT) Received: from tweety.bhp.com.au (tweety.bhp.com.au [192.83.224.130]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id SAA02988 for ; Mon, 5 Aug 1996 18:31:13 -0700 (PDT) Received: from gossamer.itmel.bhp.com.au (gossamer.itmel.bhp.com.au [134.18.115.254]) by tweety.bhp.com.au (8.7.5/8.7.5) with ESMTP id MAA13713; Tue, 6 Aug 1996 12:28:57 +1100 (EST) Received: from netman.nzsakl.bhp.com.au (netman.nzsakl.bhp.com.au [152.153.40.126]) by gossamer.itmel.bhp.com.au (8.7.1/8.7.1) with ESMTP id LAA15078; Tue, 6 Aug 1996 11:28:55 +1000 (EST) Received: from abevin (abevin.nzsakl.bhp.com.au [152.153.41.20]) by netman.nzsakl.bhp.com.au (8.7.3/8.7.3) with SMTP id NAA03211; Tue, 6 Aug 1996 13:28:47 +1200 (NZST) Date: Tue, 6 Aug 1996 13:28:47 +1200 (NZST) Message-Id: <199608060128.NAA03211@netman.nzsakl.bhp.com.au> From: Andrew Bevin To: justin@cyburbia.net.au Subject: Re: AutoPPP with mgetty and pppd Cc: freebsd-isp@freebsd.org X-Mailer: Pronto E-Mail [version 2.01] MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Sender: owner-isp@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Justin Viiret wrote: > > G'day everyone... > > Seems like I've been trying to do this for ages now ;) I'm trying to get > the AutoPPP features of mgetty to dump a user into pppd with PAP > authentication based on the /etc/passwd file. I've got that much working - > everything's fine. The only difficulty now is that when a user's logged on > via AutoPPP, he's logged in the wtmp file (there's an entry for his > username when I type 'last'), but he doesn't appear to be being logged in > utmp - so the 'w' or 'finger' commands don't show him. This makes things > rather difficult for user tracking. ;) > > Has anyone managed to get pppd to log the user in both the utmp and the > wtmp files? > > I'm running stock FreeBSD 2.1.5-RELEASE. > I run pppd direct on the tty via init. This allows my Windows 95 users to login without a dialup script, the dialup script was the biggest cause of user support problems. Windows 95 is still my biggest support problem! I encountered the same problems as you with pppd only updating wtmp and not utmp. I also wanted pppd to read the users .ppprc file. I am runnning 2.1-STABLE, so it should be the same as you. You may have also noticed that pppd doesnt always update the wtmp file when a user exits. I think when a process aborts abnormally init will clean up any entries in utmp and wtmp, but only if there is an entry in utmp. So as far as I can tell; the fact that pppd updates wtmp but not utmp can really be classed as a bug. I gave up waiting for someone else to fix it, as I'm not much of a Unix programmer, and had a go myself. It was relatively easy to do, but Im not sure whether I've done it in the best possible way. If you want I can send you the diffs for the file upap.c in pppd source. It now works great for me, I can now report users time logged correctly and can do a 'who' and see who's logged in. Im really not sure whether, or indeed how, to submit my changes to the freebsd group, perhaps someone could help me. Andrew Bevin