SUMMARY: Time/Date on Denial's in Log

George Gallen ggallen at slackinc.com
Wed Sep 17 13:41:22 GMT 1997


Original Post:
------------------------------------------------------------------------
------------------------------------------------------------------------
-----------------------
Currently if someone is denied access to the Servers Shares (unix end)
all that is recorded in the log file is.....

Gethostbyaddr failed for x.x.x.x
Gethostbyaddr failed for x.x.x.x
Denied connection from x.x.x.x. (x.x.x.x) to IPC$

Is there anyway to register the time & date as well when they were
denied
access? Right now only the last attempted is dated (by the date of last
modification of the log.pcusername file).

Similar to the allowed log entry....

08/22/97 16:28:32 ggallen (x.x.x.x) connect to service PR1 as user
george (uid=101,gid=15) (pid 2827)
08/22/97 16:31:59 ggallen (x.x.x.x) closed connection to service PR1  


We are currently using version 1.19.16p11 on Digital Unix 3.2c with C2.

Thanx
George Gallen
ggallen at slackinc.com

------------------------------------------------------------------------
------------------------------------------------------------------------
--------------------------

Solution:

Modify "access.c" Source code from :

          DEBUG(0,("Denied connection from %s (%s) to %s\n",
                   client_name(),client_addr(),
                   lp_servicename(snum)));


                                                 to:

          DEBUG(0,("%s Denied connection from %s (%s) to %s\n",
                   timestring(),client_name(),client_addr(),
                   lp_servicename(snum)));


Note the added "%s at the beginning of "Denied..." and the addition of
"timestring()" to the list of arguments.

Executed a make
then a make install

Restarted Samba, attempted a denial and checked my logs and now theres a
time & date with the Denial Message.

------------------------------------------------------------------------
------------------------------------------------------------------------
-------------------------------------------

Many Thanks to Luke Kenneth Casson Leighton (lkcl at switchboard.net) for
pointing me into the source.

George Gallen
ggallen at slackinc.com




More information about the samba mailing list