Cygwin 1.7, who version 7.0 does not respond with a value

View: New views
3 Messages — Rating Filter:   Alert me  

Cygwin 1.7, who version 7.0 does not respond with a value

by Larry W. Virden :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

when I type the who command within a Cygwin window, only an empty line is returned.

The man page states that who prints info about users who are logged in.
What I have found so far is that
-H returns headers
-q returns # users=0

while who with the -a, -b, -d, -l, --lookup, -m, -p, -r, -s, -t, -T, -w, -u options returns a blank line.

I checked /var/log/wtmp and /var/run/utmp and they exist, with permissions of 770 and a size of 0.

I grepped through /usr/share and found references to utmp in uptime and w. Right now, uptime is reporting the correct time, days, but says there are 0 users. uptime -V says procps version 3.2.7.
w shows the update information, along with headers, but no data.
I tried to do a man on utmp(5), but our installation doesn't have that installed.

It looks, to me, as if perhaps we are missing some setup that results in entries being written to utmp when a local Cygwin window is opened. I've just not been able to determine what that is yet.

Has anyone on the list encountered and solved this issue yourself? What steps did you take?  Thanks!



     

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Re: Cygwin 1.7, who version 7.0 does not respond with a value

by Larry Hall (Cygwin) :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 10/28/2009 10:04 AM, Larry W. Virden wrote:

> when I type the who command within a Cygwin window, only an empty line
> is  returned.
>
> The man page states that who prints info about users who are logged in.
> What I have found so far is that
> -H returns headers
> -q returns # users=0
>
> while who with the -a, -b, -d, -l, --lookup, -m, -p, -r, -s, -t, -T, -w,
> -u options returns a blank line.
>
> I checked /var/log/wtmp and /var/run/utmp and they exist, with
> permissions of 770 and a size of 0.
>
> I grepped through /usr/share and found references to utmp in uptime and
> w. Right now, uptime is reporting the correct time, days, but says there
> are 0 users. uptime -V says procps version 3.2.7. w shows the update
> information, along with headers, but no data. I tried to do a man on
> utmp(5), but our installation doesn't have that installed.
>
> It looks, to me, as if perhaps we are missing some setup that results in
> entries being written to utmp when a local Cygwin window is opened. I've
> just not been able to determine what that is yet.
>
> Has anyone on the list encountered and solved this issue yourself? What
> steps did you take?  Thanks!

'cygwin.bat' does not "login" to anything, so you won't see user login data for
"sessions logged in" this way.  If you want to see actual logged in users, you
will need to use 'login' or 'ssh' to really log them in.

--
Larry Hall                              http://www.rfk.com
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
216 Dalton Rd.                          (508) 893-9889 - FAX
Holliston, MA 01746

_____________________________________________________________________

A: Yes.
 > Q: Are you sure?
 >> A: Because it reverses the logical flow of conversation.
 >>> Q: Why is top posting annoying in email?

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Re: Cygwin 1.7, who version 7.0 does not respond with a value

by Eric Backus-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Larry Hall (Cygwin <reply-to-list-only-lh <at> cygwin.com> writes:

> On 10/28/2009 10:04 AM, Larry W. Virden wrote:
> > when I type the who command within a Cygwin window, only an empty line
> > is  returned.
> >
> > ...
> >
> > It looks, to me, as if perhaps we are missing some setup that results in
> > entries being written to utmp when a local Cygwin window is opened. I've
> > just not been able to determine what that is yet.


> 'cygwin.bat' does not "login" to anything, so you won't see user login data
for
> "sessions logged in" this way.  If you want to see actual logged in users,
you
> will need to use 'login' or 'ssh' to really log them in.


On the other hand, rxvt will create utmp entries, and so will mintty if told
to with the -u option.  Presumably xterm also creates utmp entries.  Even
screen creates utmp entries for it's separate windows.  So if you try using
one of these programs instead of just the default windows command window, you
can get who to return a list of sessions.
--
Eric



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple