utmp[x]/wtmp[x] logging?

David Lee T.D.Lee at durham.ac.uk
Fri Sep 3 15:15:24 GMT 1999

On Fri, 3 Sep 1999, Gerald Carter wrote:

> David Lee wrote:
> > 
> > Has any thought being given to supplementing this 
> > with utmpx/wtmpx -style logging on UNIX?
> David,
> I do this using a preexec script on a share.  The 
> problem with making this thing native to smbd is that 
> you will have a tremendous amount of logging.  As connection 
> come and go depending on things like 'dead time'
> I recommend using a preexec and postexec script on a 
> common share that you know everyone will access.  Not 
> the home directory.  as this ends up with two connections 
> during a domain logon (at least with roaming profiles it 
> does if the profiles are in the home directory).

Thanks for the reply.  I'm a samba novice, and a PC pre-novice, but on a
steep learning curve!  So forgive me if my questions are elementary.

Let's see if I understand correctly, and see what assumptions are made:

1.  We currently have "deadtime" unset.  (Granted, we have may to change
that!)  This would give a one-to-one correspondence between utmpx logging
and samba connections.  So the "tremendous amount" you mention would only
rise above non-minimal (perhaps still tremendous!) when deadtime is active
_and_ when the user has no open files.  Have I got that right? 

2.  Your recommendation assumes that the samba server provides more than
the home directory (e.g. a profile).  Our case (at present, and with no
plans to change yet) is that the samba server provides only the user's
home directory, nothing more.  (A second samba server does just print
serving, but I think that is irrelevant?  Profiles are on a real NT box.) 

> I can send you source for a tool that compiles under 
> Solaris 2.5.1 if you want.

Presumably this is what you put into preexec and postexec?  I'd be most
interested in seeing it, please, and I suspect it might be worth including
in the samba distribution for other sites with similar wishes. 


:  David Lee                                I.T. Service          :
:  Systems Programmer                       Computer Centre       :
:                                           University of Durham  :
:  http://www.dur.ac.uk/~dcl0tdl            South Road            :
:                                           Durham                :
:  Phone: +44 191 374 2882                  U.K.                  :

More information about the samba-technical mailing list