Re: Auto update

2010-04-13 Thread Jos Chrispijn
Thank you all for your kind replies; I will use the information as you suggested (including the -F :-) regards, Jos Chrispijn ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, sen

Re: Auto update

2010-04-12 Thread krad
On 11 April 2010 18:32, Randal L. Schwartz wrote: > > "Jos" == Jos Chrispijn writes: > > Jos> In order to find out if someone logged in, I should then first copy > auth.log > Jos> to auth2.log, and do a compare and then do the tail trick. Have to > cron that > Jos> every half a minute. > > N

Re: Auto update

2010-04-11 Thread Randal L. Schwartz
> "Jos" == Jos Chrispijn writes: Jos> In order to find out if someone logged in, I should then first copy auth.log Jos> to auth2.log, and do a compare and then do the tail trick. Have to cron that Jos> every half a minute. No, just track it with tail -f as was already suggested. tail -f /

Re: Auto update

2010-04-11 Thread krad
> $ tail -F -n 0 /var/log/auth.log > > Definitely use the -F rather than -f option as it will handle log rotation ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to

Re: Auto update

2010-04-11 Thread krad
On 11 April 2010 08:41, Doug Hardie wrote: > > On 10 April 2010, at 23:14, Jos Chrispijn wrote: > > > Can someone tell me if there is a way of generating an email on the > moment that someone logs in to my FreeBSD server? The mail part (phpmail) > will be easy; I don't know yet how to trigger and

Re: Auto update

2010-04-11 Thread RW
On Sun, 11 Apr 2010 11:32:27 +0200 Jos Chrispijn wrote: > > On 11-4-2010 9:41, Doug Hardie wrote: > > A cheesy way to do that is to use a popen ("tail -f > > /var/log/auth.log", "r") and then read that. It will give you every > > login regardless of ssh, telnet etc. You could then generate the

Re: Auto update

2010-04-11 Thread Ed Jobs
On Sunday 11 of April 2010 12:32, Jos Chrispijn wrote: > In order to find out if someone logged in, I should then first copy > auth.log to auth2.log, and do a compare and then do the tail trick. Have > to cron that every half a minute. > I would like to know if there is something that is alterted o

Re: Auto update

2010-04-11 Thread Jos Chrispijn
On 11-4-2010 9:41, Doug Hardie wrote: A cheesy way to do that is to use a popen ("tail -f /var/log/auth.log", "r") and then read that. It will give you every login regardless of ssh, telnet etc. You could then generate the emails from that. I have no idea just how resource intensive this migh

Re: Auto update

2010-04-11 Thread Jos Chrispijn
On 11-4-2010 8:27, andrew clarke wrote: By which method? SSH? Yes, sorry I didn't mention that. If possible on both SSH and otherwise. Thanks, Jos ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-

Re: Auto update

2010-04-11 Thread Doug Hardie
On 10 April 2010, at 23:14, Jos Chrispijn wrote: > Can someone tell me if there is a way of generating an email on the moment > that someone logs in to my FreeBSD server? The mail part (phpmail) will be > easy; I don't know yet how to trigger and pass parameter to this script or > redirect inf

Re: Auto update

2010-04-10 Thread andrew clarke
On Sun 2010-04-11 08:14:48 UTC+0200, Jos Chrispijn (ker...@webrz.net) wrote: > Can someone tell me if there is a way of generating an email on the > moment that someone logs in to my FreeBSD server? By which method? SSH? ___ freebsd-questions@freebsd.o

Auto update

2010-04-10 Thread Jos Chrispijn
Can someone tell me if there is a way of generating an email on the moment that someone logs in to my FreeBSD server? The mail part (phpmail) will be easy; I don't know yet how to trigger and pass parameter to this script or redirect info to a file (that I then send by email). Thanks. Jos Ch