home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.admin
- Path: sparky!uunet!cis.ohio-state.edu!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!caen!destroyer!terminator!stat.lsa.umich.edu!william
- From: william@stat.lsa.umich.edu (William Pietri)
- Subject: Re: Where can I find a "fingerd" that fingers the person back?
- Message-ID: <1992Aug17.171935.23127@terminator.cc.umich.edu>
- Sender: news@terminator.cc.umich.edu (Usenet Owner)
- Organization: University of Michigan Department of Statistics
- References: <1992Aug14.210137.24157@csus.edu> <1992Aug15.022526.14014@Princeton.EDU>
- Distribution: usa
- Date: Mon, 17 Aug 1992 17:19:35 GMT
- Lines: 71
-
- In article <1992Aug15.022526.14014@Princeton.EDU>, spencer@stroke.Princeton.EDU (S. Spencer Sun) writes:
- > In article <1992Aug14.210137.24157@csus.edu>, tching@target.water.ca.gov (Tracy Ching <SysAdmin>) writes:
- > > I want to know who is "finger"ing me (no jokes please...)
- > >and I want it to keep a log.
- >
- > AAAAAAAAAAAAARRRRRRRRRRGGGGGGGGGHHHHHHHHH!!!!!!!!!!!!
- >
- > From the frequency with which similar questions arise, I would guess
- > that no such fingerd has been written, but if you write one, I suggest
- > you definitely post it because there seem to be a lot of people who
- > would like to have it (I'm not one of them though)
-
- There's a version of GNU Finger that's been cleaned up by the folks at
- ICSI. (It looks like that it is available at icsi.berkeley.edu in
- pub/stolcke/icsi-finger-1.0.11.tar.Z.) If you tell it to use m4
- instead of cpp as the macro processor for plan files, then this plan
- should do what you want:
-
- === begin m4 file ===
- #
- divert(10)
- define(username,william)
- define(tempfile,maketemp(/tmp/username.XXXXX))
- define(lockfile,maketemp(/tmp/username.fingerlock))
-
- syscmd(cat lockfile) define(locktestval,sysval())
- syscmd(touch lockfile)
-
- syscmd(echo -n "Finger request at " >> tempfile)
- syscmd(date >> tempfile)
- syscmd(echo -n "on host " >> tempfile)
- syscmd(hostname >> tempfile)
- syscmd(echo >> tempfile ; echo "Reciprocal request yielded this:" >> tempfile)
- syscmd(echo >> tempfile)
-
- ifelse(LOCAL,1,`
- syscmd(/usr/local/bin/finger >> tempfile)
- ',`
- ifelse(locktestval,1,`
- syscmd(/usr/local/bin/finger @PEERNAME >> tempfile)
- ',`
- syscmd(echo "Finger already in progress." >> tempfile)
- syscmd(echo "Host PEERNAME not checked." >> tempfile)
- ')
- ')
- syscmd(/usr/ucb/mail -s "+fingered" username < tempfile)
- syscmd(rm -f tempfile)
- syscmd(rm -f lockfile)
- divert(0)sinclude(.realplan)dnl
- === end m4 file ===
-
- This m4 file fingers the site (not the user) from which the finger
- request was received and mails the user with the result. It then shows
- the text in the file .realplan to the remote user. I was worried about
- loopback problems from berserk finger servers, so this script creates a
- lock file and refuses to finger the remote site if a request for this
- user is already in progress.
-
- Even if you have no interest in semi-paranoid scripts like this, I
- still encourage you to install ICSI's version of finger at your site;
- it knows how to collect information from a group of machines and
- display it in a variety of useful ways. To see what it looks like you
- can finger @icsi.berkely.edu (and also try fingering .help@icsi).
-
- William
-
- --
- William Pietri | Email: William.Pietri@umich.edu
- Stat. Dept. Sysadmin and | or: william@stat.lsa.umich.edu
- ITD/CSS Consultant | or: USERW28W@UMICHUM.bitnet
- University of Michigan | Phone: (313) 764-9983
-