Finger Log in C Shell

Finger Log in C Shell

Post by Rezaul H. Safiuddi » Tue, 04 May 1999 04:00:00



Can someone help me write this script? I am really a beginner in this
field. I wanna write a script which will keep track of whoever is
fingering me. Do I have to write it in .plan file? What do I have to do
for this? what environment variables can I use to do this? Where can I get
a list of the environment variables? sorry, I am really a novice in this
field...i am trying to learn.

 
 
 

Finger Log in C Shell

Post by brian hile » Tue, 04 May 1999 04:00:00



Quote:> Can someone help me write this script? I am really a beginner in this
> field. I wanna write a script which will keep track of whoever is
> fingering me. Do I have to write it in .plan file? What do I have to do
> for this? what environment variables can I use to do this? Where can I get
> a list of the environment variables? sorry, I am really a novice in this
> field...i am trying to learn.

First of all, the best favor that can be done of a shell scripting
novice is to corectly council you to not attempt to use csh (or
even tcsh) to write non-trivial scripts. Csh is a shell optimized
for interactive use, and the novice who sees a superficial resemblance
to C is initially attracted to csh over k/sh until s/he gets good
enough to understand the time spent learning it is wasted.

But for versions of finger(1) that you probably do not have (as usual
the query does not specify the OS...) the only semi-portable method that
I know of determining the user's name is a technique naming a named pipe
".plan" and while the finger(1) is blocked on this named pipe, the script
queries netstat(1) for the URL of the incoming network connection.

Not a non-trivial problem, as an instructor of mine used to say.

Best that you avail yourself of such programs that have been written
for the purpose:

finger-log - Finger Logging
ftp://ftp.uu.net/usenet/comp.sources.misc/volume46/finger-log/part01

rfinger - reimplementation of Berkeley finger, Part01/01
ftp://ftp.uu.net/usenet/comp.sources.misc/volume47/rfinger/part01        

-Brian

 
 
 

Finger Log in C Shell

Post by bmar.. » Wed, 05 May 1999 04:00:00



   >Can someone help me write this script? I am really a beginner in
   >this field. I wanna write a script which will keep track of whoever
   >is fingering me. Do I have to write it in .plan file? What do I
   >have to do for this? what environment variables can I use to do
   >this? Where can I get a list of the environment variables? sorry, I
   >am really a novice in this field...i am trying to learn.

   Linkname: Unix - Frequently Asked Questions (4/7) [Frequent posting]
        URL: http://www.faqs.org/faqs/unix-faq/faq/part4/index.html

Net-Tamer V 1.08X - Test Drive

 
 
 

1. Need HELP to Log User Log-ins form the internet

Hi,

I've setup a FreeBSD 4.1.1-STABLE box to connect a network to the internet
with natd and ipfw firewall.
I've also setup the FreeBSD box to let teleworkers log in with FTP and
telnet.

Now I would like to log FTP and telnet Log-in's from teleworkers who connect
to the machine from the internet.
I woul like to see the time and IP numer from which users Log-in.

I have looked at the /var/log/messages file but this only shows SU Login's.

All help is greatly appriciated!

Luke

2. Purpose of advocacy newsgroup

3. FINGER: How can I know who is fingering or fingered me?

4. 2.2.2 -> 3.1 UPGRADE

5. shell built ins

6. Need some help with network design...

7. Shells and built-ins

8. RAM on Solaris Box

9. ? Unix Shell Syntax to log out user from a shell script ?

10. Changed shell to non existant shell while logged in as root

11. Logging finger attempts on one's account

12. mknod and finger log

13. how can i show "never logged in" when somebody finger me?