2.0.7pre2, utmp in particular

Richard Sharpe sharpe at ns.aus.com
Sat Mar 18 12:40:24 GMT 2000


At 10:02 PM 3/18/00 +1100, Freddie wrote:
>Hi,
>
>Downloaded 2.0.7pre2, configured --with-utmp, compiled, backed up my old 
>dir (2.0.5a still), installed the new one. Added these two lines to smb.conf:
>
>utmp = Yes
>utmp dir = /var/run
>
>But... if we don't have utmpx.h (Debian 2.1, 2.0.38 kernel, glibc 2.0.7 
>doesn't), it doesn't try to set the ut_host field. So I added a single line 
>to utmp_update() that writes it for me. Tada! I don't have the disk space 
>left to untar another copy of the .tar.gz, and I have no idea how to just 
>extract one file, soo... use your imagination.
>
>
>source/smbd/connection.c:
>
>(line 367)
>#else
>	pstrcpy(fname, dirname);
>	pstrcat(fname, "utmp");
>
>
>replace with:
>
>#else
>	pstrcpy(u->ut_host, host);
>
>	pstrcpy(fname, dirname);
>	pstrcat(fname, "utmp");

Sounds like an ifdef GLIBC20 is needed and a configure test for glibc2.0 vs
glibc2.1 might be needed here.

>No idea if ut_host is a part of other systems' definition of struct utmp. I 
>think this has been answered before, but I lost my samba-technical mailbox 
>(silly Eudora)...

Oh dear ... I haven't lost any mailboxes with Eudora, but I want to get off.

>                  why does a login (from Win9x at least) trigger netlogon's 
>[root] preexec twice? I even end up with 2 utmp entries now:

Hmm, first one is to access the logon script.  The second one may be to
access profiles or policies. Where does your logon home or logon path point
to? Is the client trying to access profiles?

To track it down may require a trace, which can be obtained with tcpdump.

>freddie  smb/1    zugzug            9:08pm  0.00s 13:20    ?     -
>freddie  smb/2    zugzug            9:08pm  0.00s 13:20    ?     -
>
>
>Freddie
>
>

Regards
-------
Richard Sharpe, sharpe at ns.aus.com, Master Linux Administrator :-),
Samba (Team member, www.samba.org), Ethereal (Team member, www.zing.org)
Co-author, SAMS Teach Yourself Samba in 24 Hours
Author: First Australian 5-day, intensive, hands-on Linux SysAdmin course
Author: First Australian 2-day, intensive, hands-on Samba course



More information about the samba-technical mailing list