Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 May 1996 22:17:22 -0500 (CDT)
From:      Neal Rigney <neal@mail.pernet.net>
To:        Steve Reid <root@edmweb.com>
Cc:        Neal Rigney <neal@mail.pernet.net>, Nate Williams <nate@sri.MT.net>, isp@FreeBSD.org
Subject:   Re: Logging pppd connect & disconnect
Message-ID:  <Pine.NEB.3.93.960516220642.7428A-100000@jennifer.pernet.net>
In-Reply-To: <Pine.BSF.3.91.960516133222.145B-100000@bitbucket.edmweb.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 16 May 1996, Steve Reid wrote:

> > > It's done with a line in /etc/ttys:
> > > ttyd1   "/usr/sbin/pppd -detach 115200" unknown on secure
> > > This makes the winsock scripts extremely simple, but it doesn't leave 
> > > much opertunity for customized logging.
> > > 
> > Out of curiosity, does Win95 work for you without scripting?
> 
> Haven't tried it with Win95 yet... Should I expect any problems????? I've 

Dunno.  I just haven't had the time to really try it out.

> Hadn't thought of that... Hmm... [clickety-clickety "man pppd"]... It 
> seems that the user name is not passed to that script. Using dynamic-IP, 
> there's no way to associate the address with the username, and it's the 
> username I need for billing purposes.

Well, I got around this in two ways, one ugly, and one that's just plain
interesting:

1) I report the value of $UNAME, which is set to the user logging in.
This wouldn't work in the case of a pppd run from init. :(
2) ip-up/down are called setuid to the user running pppd.  logger
automagically puts the username in. Same problem(I think) though.  If init
calls pppd, the user will still be root.  Try it out though.

> Sounds like it could work... But DOES IT LOG THE USERNAME?

If you do it my way, it most definately works:

May 14 10:25:15 ren login: login on ttycl as rgb
May 14 10:25:22 ren rgb: login: rgb on /dev/ttycl using interface ppp16
May 14 10:25:46 ren rgb: logout: rgb on /dev/ttycl using interface ppp16

I could have it report the IP, but I really don't need it for my logging
purposes.


--
Neal Rigney, PERnet Communications, (409)729-4638
neal@mail.pernet.net
My opinions are mine, damnit!  PERnet can't have them!





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.93.960516220642.7428A-100000>