Bug 914 - UTMP logging in Samba 3.0.1 does not have hostnames
Summary: UTMP logging in Samba 3.0.1 does not have hostnames
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: smbclient (show other bugs)
Version: 3.0.1
Hardware: All Solaris
: P3 normal
Target Milestone: none
Assignee: Gerald (Jerry) Carter (dead mail address)
QA Contact:
Depends on:
Blocks: 807
  Show dependency treegraph
Reported: 2003-12-23 01:10 UTC by Suresh Khatry
Modified: 2004-12-25 22:34 UTC (History)
1 user (show)

See Also:

config header file (53.11 KB, text/plain)
2004-01-08 12:35 UTC, Suresh Khatry
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Suresh Khatry 2003-12-23 01:10:50 UTC

	I was testing Samba 3.0.1 as a logon server on a Solaris 9 Sparc box.  I
compiled Samba using gcc 3.3 with the following options:

configure --prefix=/local/samba-3.0.1 --enable-static --with-nis  --with-quotas
--with-syslog --with-msdfs --with-utmp

	I set utmp = yes in the smb.conf file

	The samba server does create login entries but minus the hostname entries.  The
following lists the after and before login entries:

	With Samba 3.0.1

mackensj  smb/1                         Tue Dec 23 11:22 - 11:24  (00:02)
regoa     smb/2                         Tue Dec 23 11:22 - 11:24  (00:02)
cunningg  smb/2                         Tue Dec 23 11:21 - 11:21  (00:00)

	With Samba 2.2.8a I was getting the following:

ochomoj   smb/6        docsdp100        Mon Dec 22 23:11 - 23:59  (00:47)
wichmanr  smb/7        unchs25          Mon Dec 22 23:07 - 23:07  (00:00)
regoa     smb/4        gefpq198         Mon Dec 22 22:59 - 00:46  (01:46)

	Please advise whether this is intentional and if there is a workaround since
knowing which PCs are being used by specific staff is essential for troubleshooting 

Best Regards
Suresh Khatry
United Nations Office at nairobi (UNON)
Comment 1 Jeremy Allison 2004-01-08 11:05:26 UTC
We should log hostnames in utmp if the #define HAVE_UT_UT_HOST is
set in include/config.h.

Can you send a copy of your include/config.h file please ?

Comment 2 Suresh Khatry 2004-01-08 12:35:10 UTC
Created attachment 353 [details]
config header file

/include/config.h file as requested by Jeremy.
Comment 3 Helmut Wirth 2004-02-08 14:33:13 UTC
The same behavior here, only the IP gets logged in utmp not the hostname.
configure determines:

#define HAVE_UT_UT_HOST 1

System: linux kernel 2.2.20 (base system RH6.2) with glibc 2.1.3
Comment 4 Andrew Bartlett 2004-12-25 22:34:35 UTC
To see hostnames, and not IP addresses you must set:

hostname lookups = yes

I have this running, in production, and always get hostnames.  Given I've not
heard of anything like this on the lists, and this is against 3.0.1, I'm
inclined to close it.  If you still have problems with the above set, then feel
free to re-open it.