How to log user as they log in

How to log user as they log in

Post by Eric T. Sylva » Fri, 07 Jan 1994 08:53:16



Hello All,

  I have a question that I hope someone can help me resolve.

  I would like to have an ability to log the user that logs into my machine
  to the syslog.  Is there a utility the will do such a thing?  I presently
  have an inetd.conf entry that will tell me when someont is requesting a
  telnet session, but I can't find out who that is until they log in and
  I am unsure how I would go about setting up a type of watcher to wait
  till the user logs in and send a message to syslog (with logger or something)
  I have thought of some weird things like doing a who and putting it
  in a temporary file and then waiting two minutes and then doing a who
  again and comparing the files and sending the differnece to syslogd with
  logger.

  Any help would be appreciated.

  Thanks

  Eric Sylvain

 
 
 

How to log user as they log in

Post by W. Al » Sun, 16 Jan 1994 01:57:42



: Hello All,

:   I have a question that I hope someone can help me resolve.

:   I would like to have an ability to log the user that logs into my machine
:   to the syslog.  Is there a utility the will do such a thing?  I presently
:   have an inetd.conf entry that will tell me when someont is requesting a

I have seen a program called wrapper (from the Netherlands?), that is
inserted between the inetd-daemon and the sub-daemons called by inetd.
The wrapper writes some information to a logfile, and than invokes the
appropriate subdaemon.                                   W. Alex

 
 
 

How to log user as they log in

Post by Matthew Ca » Sun, 16 Jan 1994 05:14:26


:   I would like to have an ability to log the user that logs into my machine
:   to the syslog.  Is there a utility the will do such a thing?  I presently
:   have an inetd.conf entry that will tell me when someont is requesting a

On my system there is a file /etc/profile that all logins run before they run
their own .profile scripts.  It sets default terminals, timezone, cats the
message-of-the-day file, etc.  An addition in this script could do any kind
of logging you want.

I hope this helps.

--


 
 
 

How to log user as they log in

Post by Joe Vash » Sun, 16 Jan 1994 01:03:20




>: Hello All,

>:   I have a question that I hope someone can help me resolve.

>:   I would like to have an ability to log the user that logs into my machine
>:   to the syslog.  Is there a utility the will do such a thing?  I presently
>:   have an inetd.conf entry that will tell me when someont is requesting a

>I have seen a program called wrapper (from the Netherlands?), that is
>inserted between the inetd-daemon and the sub-daemons called by inetd.
>The wrapper writes some information to a logfile, and than invokes the
>appropriate subdaemon.                                   W. Alex

        I'm not sure if I'm correct, but couldn't you use the following:

echo $(user) $(date) >>syslog

Put that in some file that is executed everytime someone logs on. I'm kind of
new but I used this in a unix shell emulator to do much the same.

Direct all flames to /tmp/trash.

--
<======================================================================>

|    ComQuest BBS             UUCP:     heifetz!mbsun!cquest!jvasher   |
|    (313)397-5047            FIDO:     Joe Vasher>1:2410/403.0        |
|                      Thanks for flying Xcel                          |
<======================================================================>

 
 
 

How to log user as they log in

Post by Roger Walk » Tue, 18 Jan 1994 20:04:26



> On my system there is a file /etc/profile that all logins run before they
> run
> their own .profile scripts.  It sets default terminals, timezone, cats the
> message-of-the-day file, etc.  An addition in this script could do any kind
> of logging you want.

I recently used a one liner (who am i | ...) in /etc/profile to log callers
using the modem. However, batch jobs using rcp and rcmd suddently found
error conditions because the command needed a window. I had to switch to a
short script which used the 'tty' command.

--
"Please quote only the RELEVANT text to reduce the bandwidth used."

Roger Walker (403) 465-4962  ****  SysOp, CUE Here BBS (403) 465-7715
GIS Analyst, City of Edmonton Computing Resources Dept (403) 496-4145


 
 
 

How to log user as they log in

Post by Dave Pla » Fri, 11 Feb 1994 04:09:54



Quote:>  I would like to have an ability to log the user that logs into my machine
>  to the syslog.  Is there a utility the will do such a thing?  I presently
>  have an inetd.conf entry that will tell me when someont is requesting a
>  telnet session, but I can't find out who that is until they log in and
>  I am unsure how I would go about setting up a type of watcher to wait
>  till the user logs in and send a message to syslog (with logger or something)
>  I have thought of some weird things like doing a who and putting it
>  in a temporary file and then waiting two minutes and then doing a who
>  again and comparing the files and sending the differnece to syslogd with
>  logger.

On my system login checks a file (/etc/config/login.options) to
determine what login rules are. Allowable options are:

maxtries=(n)
disabletime=(seconds)
syslog=(all/fail)
passwdreq
lastlog

The third option, if set to all, logs all logins to SYSLOG

Hope this helps

David Platt
Ministry of Environment and Energy

 
 
 

How to log user as they log in

Post by Lucio Chiappet » Wed, 16 Feb 1994 01:58:47



|>
|> >  I would like to have an ability to log the user that logs into my machine
|> >  to the syslog.  Is there a utility the will do such a thing?  I presently

  If you just want to see who logged in (and do not strictly wnat it
  to go to syslog), try command "last", which accesses a file called
  /etc/utmp or /etc/wtmp, I don't remember now.
  But try " man last"

--
----------------------------------------------------------------------------
       A member of  G.ASS : Group for Astronomical Software Support          
----------------------------------------------------------------------------
Lucio Chiappetti - IFCTR/CNR     | Ma te' vugl' da' quost avis a ti' Orsign  
via Bassini 15 - I-20133 Milano  | Buttet rabios intant te se' pisnign      

Decnet:   IFCTR::LUCIO           |             (Rabisch, II 46, 119-120)    
----------------------------------------------------------------------------

 
 
 

How to log user as they log in

Post by Peter Salzm » Mon, 21 Mar 1994 16:04:21


You could also use a tcp wrapper and use grep -v to grep out everything
but modem logins..

-peter

 
 
 

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. Do all those ISA PnP cards not work under Linux?

3. Check your ppp.log or ppp.tun0.log in /var/log

4. GCC 2.6.3 and Linux 1.2.3

5. ipppd logs in /var/log/ipppd-auth.log ??

6. SAF CD-R as External CD-ROM For Sparcstation 10 ?

7. logging - "secure" logs don't tell me who is logging in?

8. fix compilation with CONFIG_AGP_ALI

9. How can I get ipppd to log in /var/log/ipppd-auth.log ????

10. User logging (WAS: Is it possible to log original IP addresses?)

11. Apache- Multiple logs (log for each user Q:How do I?)

12. How to log user access info in access.log

13. Q-> logging user names as they log in