More utmp stuff

David Collier-Brown - Sun Canada davecb at
Mon Mar 27 12:49:40 GMT 2000

 Matthew Geier <matthew at>
|  If all  you want to know is who is using the machine, having the same
| user listed 5 times 'cause they are connected to 5 different SMB
| resources is a bit much. If you want to know what they are connected to
| use smbstatus...
|  You can argue both ways on this one I expect.

	Looking at Slolaris, I show up as:
mohawk> who
davidcb    console      Mar 20 09:23    (:0)
davidcb    pts/5        Mar 20 10:08    (:0.0)
davidcb    pts/4        Mar 22 11:54    (:0.0)
davidcb    pts/6        Mar 20 15:52    (:0.0)

	By this I infer: 
		1) multiple logons are reported, but
		2) only if there are differences between them
	Utmpx's definition of difference seems to be that one
	or more of the following struct entries is different.
struct utmpx_t {
     char                 ut_user[32];   /* user login name */
     char                 ut_line[32];   /* device name (console, lnxx) */
     short                ut_type;       /* type of entry */

     ...and possibly
     int                  ut_session;    /* session ID, used for windowing */
     char                 ut_host[257];  /* host name, if remote */
     	I suggest we log multiple entries if they are "equivalently
     	different": coming from a second machine would be a good candidate,
     	as would coming to a different virtual server (equivalent to 
     	a different pty, perhaps?). Both of these might be recorded in
     	the ut_host[257] entry, which seems to have been used to indicate
     	extra information already: notice the X window system stuff in
     	the who output above.
     	Perhaps an ut_host[] entry might be:
     		<client name> (<server name>/<workgroup>)
     	where server name and the slash would exist only if
     	there were multiple netbios names for the server.
David Collier-Brown in Boston
Phone: (781) 442-0734, Room BUR03-3632

More information about the samba-technical mailing list