Bug 91442 - 'who am i' and 'who -m' do not return results as expected
'who am i' and 'who -m' do not return results as expected
Product: Red Hat Linux
Classification: Retired
Component: gnome-terminal (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Havoc Pennington
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2003-05-22 13:15 EDT by J. Erik Hemdal
Modified: 2007-04-18 12:53 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-10-04 02:05:27 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Test script for 91442 (345 bytes, application/x-sh)
2003-05-22 13:17 EDT, J. Erik Hemdal
no flags Details

  None (edit)
Description J. Erik Hemdal 2003-05-22 13:15:51 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003

Description of problem:
Problems with 'who' command.

who -m
who am i
who mom likes

do not return any results on my RHAT 8 system.  man and info pages say these
should return the session username.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
#! /bin/bash

# Test the output of who, who -m, who am i, whoami, and who mom likes
# All of these are documented to work; not all do in RHAT 8.0.

echo "This is unadorned 'who'"


echo "This is 'who -m':"

	who -m

echo "This is 'who mom likes':"

	who mom likes

echo "This is 'who am i':"

	who am i

echo "This is 'whoami':"


Actual Results:  This is unadorned 'who'
erik     :0           May 22 11:55         
This is 'who -m':
This is 'who mom likes':
This is 'who am i':
This is 'whoami':

Expected Results:  Should have seen the username 'erik' in all cases.

Additional info:

No error messages.  These options work as expected in previous versions of Red
Hat Linux that I have used (5.2, 7.1, 7.3).  Represents a regression of 
function (old scripts using who -m or who am i) would break.
Comment 1 J. Erik Hemdal 2003-05-22 13:18:00 EDT
Created attachment 91900 [details]
Test script for 91442

Test script attached.
Comment 2 Tim Waugh 2003-05-23 07:55:02 EDT
This is due to gnome-terminal not adding utmp entries.  For example, try running
who from inside an 'xterm -ls' window.
Comment 3 J. Erik Hemdal 2003-05-23 18:30:22 EDT
I confirmed that who works as expected in an xterm.  Also works in gnome-
terminal-2.2.1-3 (delivered in Red Hat 9).

Note You need to log in before you can comment on or make changes to this bug.