You are not logged in.

#1 2004-02-27 11:41:01

andreasw
Member
Registered: 2004-02-26
Posts: 12

who displays users which aren't logged in

hi,

I have a problem with

who

it displays users which aren't currently logged in.

or it displays that two users are logged in the same virtual console...

andreasw vc/1         Feb 27 12:08
root     vc/2         Feb 27 12:33
andreasw vc/2         Feb 27 12:23

w however displays the users correctly

[andreasw@andyskiste andreasw]$ w
 12:40:10 up 33 min,  3 users,  load average: 0,00, 0,04, 0,06
USER     TTY        LOGIN@   IDLE   JCPU   PCPU WHAT
andreasw vc/1      12:08   17:53   0.03s  0.00s /bin/sh /usr/X11R6/bin/startx
root     vc/2      12:33    3:15   0.04s  0.04s -bash

when I log out root who still lists andreasw (who was logged in before root),

[andreasw@andyskiste andreasw]$ who
andreasw vc/1         Feb 27 12:08
andreasw vc/2         Feb 27 12:23
[andreasw@andyskiste andreasw]$

the output of w which is correct:

 12:42:32 up 35 min,  2 users,  load average: 0,13, 0,06, 0,06
USER     TTY        LOGIN@   IDLE   JCPU   PCPU WHAT
andreasw vc/1      12:08   20:15   0.03s  0.00s /bin/sh /usr/X11R6/bin/startx

I already reinstalled coreutils and even downgraded coreutils to 5.0 which slackware 9.1 uses and which doesn't has that problem.

I hope somebody can help me

Andy

Offline

#2 2004-02-27 12:25:00

andy
Member
From: Germany
Registered: 2002-10-11
Posts: 374

Re: who displays users which aren't logged in

I would guess your /var/log/wtmp file is screwed. Try to move it to a save place and create an empty /var/log/wtmp (e.g. with touch and check if the permissions are correct).

To not have confusing consequences you should be logged in with as few users as possible. Preferably in single user mode (Although something similar does happen during log-rotation which happens durng regular operation.).

Offline

#3 2004-02-27 12:31:50

andreasw
Member
Registered: 2004-02-26
Posts: 12

Re: who displays users which aren't logged in

hi,

I will boot with the arch linux cd and than do the task.

thank you for help

Andy

Offline

#4 2004-02-27 13:02:02

andreasw
Member
Registered: 2004-02-26
Posts: 12

Re: who displays users which aren't logged in

hi,

I tried it but after some logins and logouts the problem is there again. The problem seems to me more related to /var/run/utmp, which store the currently logged in users.

It seems that it is not correctly modified when a user loggs out so the user is still in there...

w seems to use another method to get the currently logged in users.

Andy

Offline

#5 2004-02-27 14:35:37

sarah31
Member
From: Middle of Canada
Registered: 2002-08-20
Posts: 2,975
Website

Re: who displays users which aren't logged in

well i am wondering if it may not be one of yur services that might be the "other" user. this i am not aware of any program arch has that would be set like that but i have seen it before in other distros.

there must be some way you can find out which processes the "other" user is using.


AKA uknowme

I am not your friend

Offline

#6 2004-02-27 14:51:20

andreasw
Member
Registered: 2004-02-26
Posts: 12

Re: who displays users which aren't logged in

hi,

well the other user doesn't use any process

I tested it by creating a new user, logged in and out. who still displayed it, but

ps -aux | grep user

doesn't list any processes.

I now know that w also doesn't display the users correctly, it gives a wrong number of logged in users...

I also had the problem with another distribution but I can't remeber which one and I think I didn't solve the problem...

mfg

Andy

EDIT: I think the problem is that the file /var/run/utmp is not updated after a user is logging out so that user is till listed in that file. And who, finger, w etc do access that file

Offline

#7 2004-02-27 19:00:21

andreasw
Member
Registered: 2004-02-26
Posts: 12

Re: who displays users which aren't logged in

hi,

I now use the 2.4.x kernel and the problem is gone, seems to me like a bug in 2.6.3

Andy

Offline

#8 2004-02-28 10:26:01

Xentac
Forum Fellow
From: Victoria, BC
Registered: 2003-01-17
Posts: 1,797
Website

Re: who displays users which aren't logged in

I'm running 2.6.3 and I don't have this problem.


I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal

Offline

#9 2004-02-28 11:05:00

andreasw
Member
Registered: 2004-02-26
Posts: 12

Re: who displays users which aren't logged in

do you run the kernel from the kernel26 package? Or your own?

I use the kernel26 package

Andy

Offline

#10 2004-02-28 18:00:17

Xentac
Forum Fellow
From: Victoria, BC
Registered: 2003-01-17
Posts: 1,797
Website

Re: who displays users which aren't logged in

kernel26 package.


I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal

Offline

#11 2004-02-28 18:47:31

andreasw
Member
Registered: 2004-02-26
Posts: 12

Re: who displays users which aren't logged in

Well I can't understand why it doesn't work for me with 26, maybe its a bug that only occurs with a special system configuration...

I now have 2 boot menu entries 24 and 26

if I chose 24 there is no bug.
if I chose 26 the bug is there.

Andy

Offline

#12 2004-02-28 19:22:51

sarah31
Member
From: Middle of Canada
Registered: 2002-08-20
Posts: 2,975
Website

Re: who displays users which aren't logged in

can you tell us what sort of services (ie mysql, xinetd) you were starting? you may be the first to voice this problem (or notice it). i still have the feeling it may be something along those lines or some sort of  special configuration. regardless it would be good to determine what is causing this problem.


AKA uknowme

I am not your friend

Offline

#13 2004-02-28 19:32:11

andreasw
Member
Registered: 2004-02-26
Posts: 12

Re: who displays users which aren't logged in

hi,

DAEMONS=(syslogd klogd !pcmcia network netfs crond cups postfix)

Andy

Offline

Board footer

Powered by FluxBB