delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/01/23/15:36:58

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
X-Sent: 23 Jan 2001 20:14:38 GMT
From: "Kevin Wright" <kevin AT wright DOT org>
To: "Cygwin-Mailing-List" <cygwin AT cygwin DOT com>
Subject: RE: Prob with inetutils telnetd not writing to /var/run/utmp
Date: Tue, 23 Jan 2001 12:16:40 -0700
Message-ID: <000201c08571$03bde870$e088f726@holstein-mobile.ASPECTDV.COM>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0
In-Reply-To: <20010119104217.O4318@cobold.vinschen.de>
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3612.1700
Importance: Normal

Corinna,

I'm not quite sure why, but this problem has disappeared for me; JOY!
I suspect it may have to do with editing my passwd file to include
an entry for root according to your guidelines:

root::0:0:U-Administrator,S-1-5-21-???-???-???-500:/home/root:/bin/bash

Perhaps it's because I upgraded to the latest inetutils. (1.3.2-10).

In any case, who works as expected (that is: /var/run/utmp is being
updated properly by telnetd):

~/ who
kwright  tty0     Jan 23 10:46 (holstein-mobile)
kwright  tty1     Jan 23 10:50 (holstein-mobile)
root     tty2     Jan 23 12:00 (holstein-kw)

Thanks again for the great job you (and the rest of the team) are
doing.

--Kevin Wright

> -----Original Message-----
> From: cygwin-owner AT sources DOT redhat DOT com
> [mailto:cygwin-owner AT sources DOT redhat DOT com]On Behalf Of Corinna Vinschen
> Sent: Friday, January 19, 2001 2:42 AM
> To: Cygwin-Mailing-List
> Subject: Re: Prob with inetutils telnetd not writing to /var/run/utmp
>
>
> On Thu, Jan 18, 2001 at 01:49:01PM -0700, Kevin Wright wrote:
> > Hello,
> >
> > I recently upgraded to Cygwin 1.1.7 (from 1.1.4) and am happy that
> > the shellutils who utility now reports the current users logged in.
> > It might have been working for a long time but I personally just got
> > it working now.
> >
> > Here's the current output of who:
> >
> > $ who
> > kwright  tty0     Jan 17 19:00 (holstein-mobile.ASPECTDV.COM)
> > kwright  tty1     Jan 17 17:53 (holstein-mobile.ASPECTDV.COM)
> > kwright  tty2     Jan 17 18:31 (holstein-mobile.ASPECTDV.COM)
> >
> > According to the output from strace, who derives it's info from
> > /var/run/utmp. However, if someone logs in remotely via telnet,
> > /var/log/wtmp gets updated. To find out who is logged in remotely,
> > I have to pass /var/log/wtmp as a parameter to who, thus:
> >
> >
> > $ who /var/log/wtmp
> > [output deleted]
> > kwright  tty2     Jan 17 16:54 (holstein-kw)
> > kwright  tty3     Jan 17 17:22 (holstein-mobile.ASPECTDV.COM)
> > kwright  tty1     Jan 17 17:53 (holstein-mobile.ASPECTDV.COM)
> > kwright  tty2     Jan 17 18:31 (holstein-mobile.ASPECTDV.COM)
> > kwright  tty0     Jan 17 19:00 (holstein-mobile.ASPECTDV.COM)
> >
> > This not only gives you the list of current users but also a
> > list of past logins, which means I can't tell if the who
> > is still logged in. (other than checking the current number
> > of in.telnetd processes)
> >
> > My question is, is this expected behavior or should telnetd also
> > be writing to /var/run/utmp? I looked at the source and found
> > references to utmp but they are ifdeffed and I couldn't figure
> > out whether it is supposed to be used or not.
>
> I just tried to remotely logon to my Cygwin box using ssh, telnet
> and rlogin. As far as I can tell, everything is ok. Login with all
> three methods leave their marks as they should. I can't see any
> flaw that a login via telnet doesn't show up in the standard
> `who' output.
>
> Just to be sure, I had another look into the man page of utmp/wtmp
> on my Linux box. Excerpt:
>
>        The utmp file allows one to discover information about who
>        is currently using the system.  There may  be  more  users
>        currently  using  the system, because not all programs use
>        utmp logging.
>
> Especially the latest sentence is of interest. While telnet is
> doing the right thing AFAICS, I think the above is good to know.
>
>        The wtmp file records all logins and logouts.  Its  format
>        is  exactly  like  utmp except that a null user name indi­
>        cates a logout on the associated  terminal.
>
> So wtmp is containing the right entries either as your above
> output states.
>
>        [...] wtmp  is  maintained  by
>        login(1), and init(1) and some versions of getty(1).  Nei­
>        ther of these programs creates  the  file,  so  if  it  is
>        removed record-keeping is turned off.
>
> That's just FYI. Keep track of the size of wtmp when you are using
> it since it always grows unless you don't shrink it to size 0
> from time to time.
>
> Corinna
>
> --
> Corinna Vinschen                  Please, send mails regarding Cygwin to
> Cygwin Developer                                mailto:cygwin AT cygwin DOT com
> Red Hat, Inc.
>
> --
> Want to unsubscribe from this list?
> Check out: http://cygwin.com/ml/#unsubscribe-simple
>
>


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019