Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Aug 1996 13:28:47 +1200 (NZST)
From:      Andrew Bevin <zabeva@nzsakl.bhp.com.au>
To:        justin@cyburbia.net.au
Cc:        freebsd-isp@freebsd.org
Subject:   Re: AutoPPP with mgetty and pppd
Message-ID:  <199608060128.NAA03211@netman.nzsakl.bhp.com.au>

index | next in thread | raw e-mail

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


home | help

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