followup on utmp/wtmp logging?

David Lee T.D.Lee at
Tue Nov 23 10:57:13 GMT 1999

On Tue, 23 Nov 1999, Harald Hannelius wrote:

> Has there been any more talk about the recent question about utmp/wtmp
> support in samba?
> This would really be a nice feature. It would abstract the windows clients
> even more and one could use standard unix tools when messaging. Above all,
> I would get the users login/logouts logged properly.

Yes.  It was me, I think, who first asked about this some months ago.  As
far as I recall, there was no response.  So I went ahead anyway and have
done patches for 2.0.4(b) and 2.0.6 .  They seem to work fine on our
Solaris 2.6/2.7 systems, which can use the "x" form of utmp/wtmp. 

Known "issues":

1. For non-"x"  systems I was unable to get the cumulative wtmp stuff
working (despite reading "man" pages from four different operating
systems).  I battled fruitlessly (odd mixed metaphor there!) for ages and
eventually gave up.  Needs someone wiser (or more persitent) than me...

2. I made certain assumptions about various fields in the utmp structure,
(e.g. filling in a "ut_id";  what "ut_host" to use) which may not ideal.
(Do they need to be installation-configurable?  If so, how?)

I'd be happy, nay, delighted, for my patch to be taken as the basis for
incorporating such a feature into Samba. 


Slight subject deviation...

Although I am a devoted Samba follower, one of my concerns is about the
difficult of getting such things incorporated.

We are a large-ish site (19,000 registered identifiers, over 1,000 PCs,
upwards of 400 simultaneous connections (and likely to grow)).  So we try
to take things "out of the box", keep them as simple and "default" as
reasonably possible and avoid tinkering.  On those occasions when we do
tinker, we only do so after considerable thought.

Nevertheless in recent months we have, after thought, produced four
patches, with mixed results about getting them incorporated into Samba
or discussed on this list:

1.  "inherit mode":  there was some discussion about this back in
September, and the Samba folks (who are busy!) said they liked the idea
and would like to include it (we discussed a possible modification).
No apparent action yet.

2.  "preexec close":  This was small and simple.  After the patch 
seemed to go astray in the earliest 2.0.6 beta, it was included.
Success.  Thanks.

3. Veritas quotas:  Admittedly a tricky issue.  I started some discussion
a few months ago; the principle was accepted.  But things went very quiet
(even though Veritas now claim to support Samba).  This, too, was looking
demoralising.  (Actually a few days, someone from Veritas did contact me,
but I'm now having to work on persuading them about the principle.  Sigh.)

4.  utmp/wtmp: Discussion never got started.  I assumed there was no other
interest.  I wanted to concentrate my "persuasion tactics" to the Samba
team on the higher priority aspects (and probably more generally useful to
others) of the other three patches. 


Returning to utmp/wtmp...

Before I mail the patch to individuals, could the Samba Team or others
comment on the desirability (or any pitfalls) of such utmp/wtmp stuff?
And if the idea is generally acceptable, what is the likelihood of getting
it incorporated into future Samba releases.

Thanks.  (And, despite my apparent moaning above, many thanks to the Samba
Team and the other contributors, for a great product.) 


:  David Lee                                I.T. Service          :
:  Systems Programmer                       Computer Centre       :
:                                           University of Durham  :
:            South Road            :
:                                           Durham                :
:  Phone: +44 191 374 2882                  U.K.                  :

More information about the samba-technical mailing list