All Forums |
Register |
Login |
Search |
Subscriptions |
My Profile |
Inbox |
Tool Warehouse |
FAQs |
Resources |
Help |
Member List |
Address Book |
Logout |
|
|
weird behaviour of "who" command
|
Logged in as: Guest |
Users viewing this topic: none |
|
Login |
|
|
weird behaviour of "who" command - Oct. 27, '04, 2:47:54 AM
|
|
|
cortez_
Posts: 330
Joined: Mar. 27, '04,
From: Poland
Status: offline
|
I have noticed a strange behavior of the "who" command. There happens sometimes that when I'm logged in via ssh the command doesn't sidplay the output. BUT it's hard to be reproduced. I tested two situations. Once when I logged in from one computer to the interix machine it behaved correctly. The second time when I logged in from a linux machine the uoutput of "who" was missing.
Did anyone of you noticed such bevaiour?
It doesn't seem to have anything with the $TERM setting because I have changed it to different values and no change at all.
|
|
|
RE: weird behaviour of "who" command - Oct. 27, '04, 8:32:32 AM
|
|
|
Rodney
Posts: 3729
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
|
Check to see which who is being run.
Try explicitly running "/bin/who".
If a Win32 "who" is being run then no telling how or what it's going to print.
|
|
|
RE: weird behaviour of "who" command - Oct. 27, '04, 8:37:31 AM
|
|
|
cortez_
Posts: 330
Joined: Mar. 27, '04,
From: Poland
Status: offline
|
When I log in remotely from a linux machine (Actually I logi ni in sych a chain if that matters WINXP---ssh--->LINUX---ssh--->INTERIX)
The who, and /bin/who give no output at all :(
see:
quote:
Welcome to the Interix UNIX utilities.
DISPLAY=localhost:0.0
Bash v2.05b Welcome to the world of colours...
root ~#>who
root ~#>/bin/who
root ~#>
|
|
|
RE: weird behaviour of "who" command - Oct. 27, '04, 8:48:36 AM
|
|
|
Rodney
Posts: 3729
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
|
Is Interix installed on a FAT filesystem?
|
|
|
RE: weird behaviour of "who" command - Oct. 27, '04, 9:28:43 AM
|
|
|
cortez_
Posts: 330
Joined: Mar. 27, '04,
From: Poland
Status: offline
|
Nope, It's on the NTFS
|
|
|
RE: weird behaviour of "who" command - Oct. 27, '04, 11:34:27 AM
|
|
|
Rodney
Posts: 3729
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
|
Okay.
If you do finger does it give output?
Are the files /var/adm/utmpx and /var/adm/wtmpx present on your system?
|
|
|
RE: weird behaviour of "who" command - Oct. 27, '04, 10:09:52 PM
|
|
|
markfunk
Posts: 673
Joined: Mar. 31, '03,
Status: offline
|
try "truss /bin/who". What output do you get ?
|
|
|
RE: weird behaviour of "who" command - Oct. 28, '04, 1:31:38 AM
|
|
|
cortez_
Posts: 330
Joined: Mar. 27, '04,
From: Poland
Status: offline
|
Finger gives "No one logged in" when logged in via ssh. When executed normally it reports that one user is logged in.
The /var/adm/ files are present
The output of truss is below
Welcome to the Interix UNIX utilities.
DISPLAY=localhost:0.0
Bash v2.05b Welcome to the world of colours...
root ~#>pkg_info | grep openssh
openssh-3.8.0.1.2-bin version 3.8p1-2 (3.8.0.1.2) of OpenSSH for Interix 3.5
root ~#>finger
No one logged on.
root ~#>ls -l /var/adm
total 168
drwxrwxr-x 1 Administrator +Administratorzy 0 Sep 9 22:14 log
-rwxr--r-- 1 +SYSTEM +Administratorzy 1920 Oct 27 22:58 utmpx
-rwxr--r-- 1 +SYSTEM +Administratorzy 169728 Oct 27 22:58 wtmpx
root ~#>truss /bin/who
tracing pid 421
getdata() getdata returned 0
getrlimit() getrlimit returned 0
pthread_inform_signals() pthread_inform_signals returned 0
sigaction() sigaction returned 0
sigaction() sigaction returned 0
sigaction() sigaction returned 0
sigaction() sigaction returned 0
sigaction() sigaction returned 0
sigaction() sigaction returned 0
sigaction() sigaction returned 0
sigaction() sigaction returned 0
open("/", 0x1) open returned 3
fstat(3, 0xBC0710, 0x0) fstat ret: 0 dev: 0x40000000000043 ino: 0x000027f4
fcntl(3, 0x3, 0x1) fcntl returned 0
readdir(3, 0x8991DC, 5120, 1) readdir returned 482 0x1E2
close(3) close returned 0
pthread_mutex_destroy(0x8991C8) pthread_mutex_destroy returned 0
open("/dev", 0x1) open returned 3
fstat(3, 0xBC0710, 0xB20710) fstat ret: 0 dev: 0x40000000000043 ino: 0x00002e57
fcntl(3, 0x3, 0x1) fcntl returned 0
readdir(3, 0x8991DC, 5120, 1) readdir returned 5110 0x13F6
close(3) close returned 0
pthread_mutex_destroy(0x8991C8) pthread_mutex_destroy returned 0
open("/dev/fs", 0x1) open returned 3
fstat(3, 0xBC0710, 0xBA0710) fstat ret: 0 dev: 0x24000000000000 ino: 0x00000000
fcntl(3, 0x3, 0x1) fcntl returned 0
readdir(3, 0x8991DC, 5120, 1) readdir returned 142 0x8E
close(3) close returned 0
pthread_mutex_destroy(0x8991C8) pthread_mutex_destroy returned 0
open("/dev/fs/C", 0x1) open returned 3
fstat(3, 0xBC0710, 0xBA0710) fstat ret: 0 dev: 0x41010000000043 ino: 0x00000005
fcntl(3, 0x3, 0x1) fcntl returned 0
readdir(3, 0x8991DC, 5120, 1) readdir returned 826 0x33A
close(3) close returned 0
pthread_mutex_destroy(0x8991C8) pthread_mutex_destroy returned 0
open("/dev/fs/C/WINDOWS", 0x1) open returned 3
fstat(3, 0xBC0710, 0xBA0710) fstat ret: 0 dev: 0x41010000000043 ino: 0x0000001c
fcntl(3, 0x3, 0x1) fcntl returned 0
readdir(3, 0x8991DC, 5120, 1) readdir returned 5118 0x13FE
readdir(3, 0x8991DC, 5120, 0) readdir returned 5098 0x13EA
readdir(3, 0x8991DC, 5120, 0) readdir returned 4184 0x1058
close(3) close returned 0
pthread_mutex_destroy(0x8991C8) pthread_mutex_destroy returned 0
open("/", 0x1) open returned 3
fstat(3, 0xBC0710, 0x0) fstat ret: 0 dev: 0x40000000000043 ino: 0x000027f4
fcntl(3, 0x3, 0x1) fcntl returned 0
readdir(3, 0x8991DC, 5120, 1) readdir returned 482 0x1E2
close(3) close returned 0
pthread_mutex_destroy(0x8991C8) pthread_mutex_destroy returned 0
open("/dev", 0x1) open returned 3
fstat(3, 0xBC0710, 0x0) fstat ret: 0 dev: 0x40000000000043 ino: 0x00002e57
fcntl(3, 0x3, 0x1) fcntl returned 0
readdir(3, 0x8991DC, 5120, 1) readdir returned 5110 0x13F6
close(3) close returned 0
pthread_mutex_destroy(0x8991C8) pthread_mutex_destroy returned 0
open("/dev/fs", 0x1) open returned 3
fstat(3, 0xBC0710, 0x0) fstat ret: 0 dev: 0x24000000000000 ino: 0x00000000
fcntl(3, 0x3, 0x1) fcntl returned 0
readdir(3, 0x8991DC, 5120, 1) readdir returned 142 0x8E
close(3) close returned 0
pthread_mutex_destroy(0x8991C8) pthread_mutex_destroy returned 0
open("/dev/fs/C", 0x1) open returned 3
fstat(3, 0xBC0710, 0x0) fstat ret: 0 dev: 0x41010000000043 ino: 0x00000005
fcntl(3, 0x3, 0x1) fcntl returned 0
readdir(3, 0x8991DC, 5120, 1) readdir returned 826 0x33A
close(3) close returned 0
pthread_mutex_destroy(0x8991C8) pthread_mutex_destroy returned 0
open("/dev/fs/C/SFU", 0x1) open returned 3
fstat(3, 0xBC0710, 0x0) fstat ret: 0 dev: 0x41010000000043 ino: 0x000027f4
fcntl(3, 0x3, 0x1) fcntl returned 0
readdir(3, 0x8991DC, 5120, 1) readdir returned 538 0x21A
close(3) close returned 0
pthread_mutex_destroy(0x8991C8) pthread_mutex_destroy returned 0
stat("/tmp", 0x00BC0728) stat ret: 0 dev: 0x40000000000043 ino: 0x00002e78
stat("/var/mail/root", 0x00BC0738) stat failed: errno 2, No such file or directory
getids() getids returned 0
stat("/dev/fs/C/Documents and Settings/root", 0x00BC0768) stat ret: 0 dev: 0x41010000000043 ino: 0x00000cc9
stat(".", 0x00BC0720) stat ret: 0 dev: 0x41010000000043 ino: 0x00000cc9
getids() getids returned 0
getids() getids returned 0
getids() getids returned 0
getids() getids returned 0
getids() getids returned 0
open("/bin/who", 0x1) open returned 3
fcntl(3, 0x0, 0xA) fcntl returned 10 0xA
close(3) close returned 0
fcntl(10, 0x3, 0x1) fcntl returned 0
isatty(0) isatty returned 0
fcntl(0, 0x4, 0x4A5A28) fcntl returned 2
sysconf() sysconf returned 512 0x200
sigprocmask() sigprocmask returned 0
sigaction() sigaction returned 0
sigaction() sigaction returned 0
read(10, 0x898E08, 512) read returned 0
close(10) close returned 0
sigprocmask() sigprocmask returned 0
sigprocmask() sigprocmask returned 0
exit(0) process exited with status 0
root ~#>
|
|
|
RE: weird behaviour of "who" command - Oct. 28, '04, 1:34:25 AM
|
|
|
cortez_
Posts: 330
Joined: Mar. 27, '04,
From: Poland
Status: offline
|
It's wierd but when I do truss /bin/who when I'm not logged in via ssh it returns something slightly different
Should that be like this?
root ~#>truss /bin/who
tracing pid 1347
getdata() getdata returned 0
getrlimit() getrlimit returned 0
pthread_inform_signals() pthread_inform_signals returned 0
ioctl(0, 0x40087404, 0x412BD8) ioctl returned 0
open("/var/adm/utmpx", 0x1) open returned 3
fstat(3, 0xA80710, 0x0) fstat ret: 0 dev: 0x40000000000043 ino: 0x00001d84
isatty(3) isatty returned 0
read(3, 0x824088, 4096) read returned 1536 0x600
fstat(1, 0xA80710, 0xA60710) fstat ret: 0 dev: 0x0 ino: 0x00000000
isatty(1) isatty returned 0
isatty(1) isatty returned 0
gettzenv() gettzenv returned 0
open_nocancel("/usr/share/zoneinfo/Europe/Sarajevo", 0x1) open_nocancel returned
4
read_nocancel(4, 0x81DB80, 7484) read_nocancel returned 696 0x2B8
close_nocancel(4) close_nocancel returned 0
write(1, 0x825090, 47) gprzybylski ttyn00 Oct 28 07:33
write returned 47 0x2F
read(3, 0x824088, 4096) read returned 0
lseek(0, 1, 0) lseek returned 0
lseek(0, 0, 0) lseek returned 0
lseek(3, 1, 0) lseek returned 0
lseek(3, 0, 1536) lseek returned 0
exit(0) process exited with status 0
root ~#>
|
|
|
RE: weird behaviour of "who" command - Oct. 28, '04, 1:47:53 AM
|
|
|
Rodney
Posts: 3729
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
|
I think is is solved from the discussion over in the thread:
http://www.interopsystems.com/tools/forum/tm.asp?m=4081&mpage=1&key=
I missed adding the call for the login entry. So, who is okay because
there is nothing to report. An update to openssh is in the works.
|
|
|
RE: weird behaviour of "who" command - Oct. 28, '04, 3:21:24 AM
|
|
|
cortez_
Posts: 330
Joined: Mar. 27, '04,
From: Poland
Status: offline
|
So these two issues are originating from the same thing? But when I ssh int the machine from remote side and I am at the same time logged in on the glass there should be something to be reported, or am I wrong?
|
|
|
RE: weird behaviour of "who" command - Oct. 28, '04, 10:43:34 AM
|
|
|
Rodney
Posts: 3729
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
|
Well, I have the fix done here and the users ssh'ing in now appear in the who
output when they did not before.
If someone has a login shell running on the glass then they should appear in the
output from who and finger. From the shell on the glass does your
output appear different than through the ssh session?
|
|
|
RE: weird behaviour of "who" command - Oct. 28, '04, 4:29:35 PM
|
|
|
cortez_
Posts: 330
Joined: Mar. 27, '04,
From: Poland
Status: offline
|
That'w weird because now the who command doesn't show anything when typed on the glass and neither form ssh. I don't know id everything is OK because I believe it should show something once I type it on the glass. Maybe it's something with the /var/adm/* files?
The finger works OK
see (from the bash on the glass invoked as login shell one user on the glass one user logged via ssh):
quote:
root ~#>finger
Login Name Tty Idle Login Time Office Office Phone
root x☺é n00 - Thu 22:26
root n01 - Thu 22:30
root ~#>who
root ~#>
< Message edited by cortez_ -- Oct. 28, '04, 4:35:57 PM >
|
|
|
RE: weird behaviour of "who" command - Oct. 29, '04, 3:33:02 AM
|
|
|
cortez_
Posts: 330
Joined: Mar. 27, '04,
From: Poland
Status: offline
|
On another machine the "who" works from the glass properly, maybe ath home I've got something broken???
|
|
|
RE: weird behaviour of "who" command - Oct. 29, '04, 10:55:22 AM
|
|
|
Rodney
Posts: 3729
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
|
Check the /var/adm/utmpx and /var/adm/wtmpx files.
Size, owner, dates, etc. (i.e. run stat(1) on these files).
|
|
|
RE: weird behaviour of "who" command - Oct. 29, '04, 1:10:18 PM
|
|
|
cortez_
Posts: 330
Joined: Mar. 27, '04,
From: Poland
Status: offline
|
The output is below:
root /var/adm#>stat utmpx
utmpx
mode: 100711 (-rwxr--r-- , regular file)
inode: 373
dev: 1073741891
rdev: 0
nlink: 1
uid: 66834 +SYSTEM
gid: 131616 +Administratorzy
size: 1920d (1k, 0M)
atime: 1099069262 (Fri Oct 29 18:59:59 CEST 2004)
mtime: 1099069262 (Fri Oct 29 18:59:02 CEST 2004)
ctime: 1099069262 (Fri Oct 29 19:01:02 CEST 2004)
blksize: 4096
blocks: 4
attrs: 32
attrs: 32
info: 1 (inode is reliable)
root /var/adm#>stat wtmpx
wtmpx
mode: 100711 (-rwxr--r-- , regular file)
inode: 26311
dev: 1073741891
rdev: 0
nlink: 1
uid: 66834 +SYSTEM
gid: 131616 +Administratorzy
size: 178944d (174k, 0M)
atime: 1099069262 (Fri Oct 29 18:59:59 CEST 2004)
mtime: 1099069262 (Fri Oct 29 18:59:02 CEST 2004)
ctime: 1099069262 (Fri Oct 29 19:01:02 CEST 2004)
blksize: 4096
blocks: 350
attrs: 32
info: 1 (inode is reliable)
root /var/adm#>ls -l
total 177
drwxrwxr-x 1 Administrator +Administratorzy 0 Sep 9 22:14 log
-rwxr--r-- 1 +SYSTEM +Administratorzy 1920 Oct 29 18:59 utmpx
-rwxr--r-- 1 +SYSTEM +Administratorzy 178944 Oct 29 18:59 wtmpx
root /var/adm#>
Administratorzy is the polish name for the administrators group (but I believe the language is not the issue here). The same problem (who that does not display anything) appears also from ksh and from Administrator account.
< Message edited by cortez_ -- Oct. 29, '04, 1:16:00 PM >
|
|
|
RE: weird behaviour of "who" command - Oct. 29, '04, 2:49:28 PM
|
|
|
Rodney
Posts: 3729
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
|
The file permissions on the utmpx and wtmpx files looks okay.
Language/locale is no issue with this. It's just raw data to be displayed.
Well, the only thing I can figure is that some of the data in the utmpx file
(which is where who gets it's info from) is out of wack. Reasons I
can't come up with right now.
A reboot will initialize the utmpx file from scratch. Give that a try.
|
|
|
RE: weird behaviour of "who" command - Oct. 29, '04, 5:03:08 PM
|
|
|
cortez_
Posts: 330
Joined: Mar. 27, '04,
From: Poland
Status: offline
|
The reboot did not help :(
|
|
|
RE: weird behaviour of "who" command - Oct. 29, '04, 5:16:52 PM
|
|
|
Rodney
Posts: 3729
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
|
> The reboot did not help :(
When you run "who -a" does it give any output ?
|
|
|
RE: weird behaviour of "who" command - Oct. 30, '04, 3:26:50 AM
|
|
|
cortez_
Posts: 330
Joined: Mar. 27, '04,
From: Poland
Status: offline
|
nope :(
neither does who -b and who -m work
Maybe the file itself is corrupted or something? Or maybe it has something to do with the terminal?
< Message edited by cortez_ -- Oct. 30, '04, 3:29:24 AM >
|
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
|
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts |
|
|
|