who and finger command not working properly

who and finger command not working properly

Post by beta » Fri, 13 Jun 2008 01:24:59


Hi All,

The 'who' and 'finger' commands do not work properly on my system. It
is not display all users, who are current login (active or idle). I
can see three users (root and two other users), but not all users
(50). is it a networking or /utmp or /wtmp problem? Does anyone know
how to solve the problem?

Thanks very much,
Beta
 
 
 

who and finger command not working properly

Post by Doug Freyb » Fri, 13 Jun 2008 04:15:13


Neither program is intended to display users not currently
logged in.


You can "finger $USER" on users not logged in. Write a
script that cycles through the entries in /etc/passwd and
runs finger on each account.

But most likely you're trying to do something specific and you
are asking the wrong question - What are you trying to do?

 
 
 

who and finger command not working properly

Post by beta » Fri, 13 Jun 2008 04:55:34

The 'who' and 'finger' command- to find out who login on my system,
that is what I want to do. I know there are 50 users are login and
working on my system. when I run 'finger' or 'who' command, it display
only 1 or 2 users.
 
 
 

who and finger command not working properly

Post by Doug Freyb » Fri, 13 Jun 2008 07:17:06


who and finger - who is logged in now

last - who logged in when

/etc/passwd - who can login
 
 
 

who and finger command not working properly

Post by beta » Fri, 13 Jun 2008 07:55:32

> who and finger - who is logged in now

This is where I had problem. The who and finger command do not display
all users, who are logged in. It shows only few users.


It show all users, who were (are) logged in.
 
 
 

who and finger command not working properly

Post by hymie » Fri, 13 Jun 2008 21:45:40

In our last episode, the evil Dr. Lacto had captured our hero,
beta < XXXX@XXXXX.COM >, who said:


Not all methods of accessing a machine will write an entry into utmp
and/or wtmp.

eric-x% finger
Login Name Tty Idle Login Time Office Office Phone
eric Eric tty1 21:01 Jun 6 07:57 x 1121
eric-x% who
eric tty1 Jun 6 07:57
eric-x% ps ax | grep zsh
1914 tty1 Ss 0:00 -zsh
25663 pts/0 Ss+ 0:00 -zsh
25704 pts/4 Ss+ 0:00 zsh
25829 pts/5 Ss+ 0:00 zsh
26445 pts/6 Ss+ 0:00 zsh
26450 pts/7 Ss 0:00 zsh
27934 pts/9 Ss+ 0:00 zsh
28340 pts/14 Ss 0:00 zsh
28726 pts/8 Ss 0:00 zsh
28861 pts/2 Ss 0:00 zsh
31761 pts/11 Rs 0:00 zsh
eric-x%

eric@srv290:~$ who
root tty1 Feb 22 15:39
eric pts/8 Jun 10 18:30 (c-69-140-142-111.hsd1.md.comcast.net)
eric pts/17 Apr 11 22:20 (c-69-140-142-111.hsd1.md.comcast.net)
eric pts/24 Apr 11 22:22 (c-69-140-142-111.hsd1.md.comcast.net)
eric pts/25 Jun 10 18:31 (c-69-140-142-111.hsd1.md.comcast.net)
eric pts/26 Jun 12 08:41 (c-69-140-142-111.hsd1.md.comcast.net)
eric@srv290:~$ ps axwu | grep bash
root 1558 0.0 0.0 53964 1556 tty1 Ss+ 2007 0:00 -bash
root 14018 0.0 0.0 53980 1644 pts/4 Ss+ 2007 0:00 /bin/bash
root 14043 0.0 0.0 53980 1640 pts/5 Ss+ 2007 0:00 /bin/bash
curly 24726 0.0 0.0 53968 1428 pts/6 Ss 2007 0:00 /bin/bash
curly 24737 0.0 0.0 53968 1428 pts/7 Ss 2007 0:00 /bin/bash
curly 24829 0.0 0.0 53972 1432 pts/2 Ss 2007 0:00 /bin/bash
curly 24831 0.0 0.0 53972 1432 pts/9 Ss 2007 0:00 /bin/bash
curly 24835 0.0 0.0 53968 1428 pts/11 Ss 2007 0:00 /bin/bash
[...]

--hymie! http://www.yqcomputer.com/ ~hymie XXXX@XXXXX.COM
------------------------ Without caffeine for 590 days ------------------------
 
 
 

who and finger command not working properly

Post by Doug Freyb » Sat, 14 Jun 2008 00:49:40


Please cut and paste some output that demonstrates
what you mean. I think you do not understand what
"logged in now" means. Unless you have a corrupt
wtmp file who, finger and last do tell about all login
sessions. Thus you are probably fussing about
processes not associated with login sessions.

You're still trying to accomplish something you have
not described. You are discussing tools in the adstract
and that often does nothing to help accomplish what
you really need to get done.
 
 
 

who and finger command not working properly

Post by beta » Sun, 15 Jun 2008 01:52:06


student/qnguyen5> ps axwu | grep tcsh
mike 25324 0.0 0.0 7488 1188 pts/4 Ss+ May20 0:00 -tcsh
mike 17385 0.0 0.0 7524 1832 pts/5 Ss May23 0:00 -tcsh
mike 31922 0.0 0.0 7632 1884 pts/6 Ss+ May28 0:00 -tcsh
qnguyen5 25539 0.0 0.0 7500 2144 pts/1 Ss Jun11 0:00 -tcsh
mike 17633 0.0 0.0 7548 2296 pts/14 Ss+ Jun12 0:00 -tcsh
mike 12851 0.0 0.0 7640 2304 pts/7 Ss+ Jun12 0:00 -tcsh
mike 18815 0.0 0.0 7532 2260 pts/10 Ss+ Jun12 0:00 -tcsh
test 26886 0.0 0.0 7508 2156 pts/0 Ss 08:53 0:00 -tcsh
mike 27871 0.0 0.0 7656 2308 pts/8 Ss+ 09:15 0:00 -tcsh
qnguyen5 29089 0.0 0.0 3716 776 pts/1 S+ 09:40 0:00 grep
tcsh

student/qnguyen5> finger -s
Login Name Tty Idle Login Time Where
mike Mike Ty pts/4 23d May 20 17:28
mike Mike Ty pts/5 16:43 May 23 09:53
mike Mike Ty pts/6 16:28 May 28 16:57
mike Mike Ty pts/7 17:14 Thu 13:36
mike Mike Ty pts/8 26 Fri 09:15
mike Mike Ty pts/10 17:15 Thu 16:00
mike Mike Ty pts/14 17:15 Thu 10:11
test Test Ng pts/0 1 Fri 08:53
test Test Ng pts/8 26 Thu 19:58 localhost:10.0
qnguyen5 Q Nguyen pts/1 - Wed 08:40
root root 1 42d May 1 14:21
root root pts/2 22:17 Wed 15:46

student/qnguyen5> who
root tty1 May 1 14:21
test pts/0 Jun 13 08:53
qnguyen5 pts/1 Jun 11 08:40
root pts/2 Jun 11 15:46
mike pts/4 May 20 17:28
mike pts/5 May 23 09:53
mike pts/6 May 28 16:57
mike pts/7 Jun 12 13:36
mike pts/8 Jun 13 09:15
test pts/8 Jun 12 19:58 (localhost:10.0)
mike pts/10 Jun 12 16:00
mike pts/14 Jun 12 10:11


There are 20 users are logged in, and working on the system. However,
there are only 4 show when I do finger and who command. Does anyone
has any clue?

Thanks,
B
 
 
 

who and finger command not working properly

Post by Doug Freyb » Sun, 15 Jun 2008 03:47:57


> mike 17385 .0 .0 7524 832 pts/5 s May23>0:00 -tcsh
> mike 31922 .0 .0 7632 884 pts/6 s+>ay28 0:00 -tcsh
> qnguyen5 25539 .0 .0 7500 144 pts/1>s Jun11 0:00 -tcsh
> mike 17633 .0 .0 7548 29> pts/14 Ss+ un12 0:00 -tcsh
> mike 12851 .0 .0 76>0 304 pts/7 s+ un12 0:00 -tcsh
> mike 18815 .0 >0 7532 260 pts/10 Ss+ un12 0:00 -tcsh
> test 2688> .0 .0 7508 156 pts/0 s 08:53 0:00 -tcsh
> mik> 27871 .0 .0 7656 308 pts/8 s+ 9:15 0:00 -tcsh >> qnguy>n5>29089 .0 .0 gt;3716 776 p>s/1 + 09:40 0:00 grep
> tcsh
>
> student/qngu>en5> finger -s
> Login ame t> dle ogin Time Where
> mike Mike gt;y pts/4 23d ay 20 17:28
>>mike Mike y pts/5 16:43 ay 23>09:53
> mike Mike y ts/6 1>:28 ay 28 16:57
> mike Mike y p>s/7 17:14 Thu 13:36
> mike Mike y > pts/8 6 Fri 09:15
> mike > Mike y ts/10 7:15 Thu 16:00
> mike gt;Mike y pts/14 7:15 Thu 10:11 >> test Test Ng pts/0 1 Fri>08:53
> test Test Ng pts/8 6 gt;Th> 19:58 localhost:>0.0
>>qnguyen5 Q Nguyen pts/> - Wed 08:40
> root>root > 42d ay 14:21
> root gt;root ts/2 gt;22:17 Wed 15:46
>
> stude>t/qnguyen5> who
> root tty> May 14:21
> test p>s/0 un 13 08:53
> qngu>en5 pts/1 un 11 08:40
> root pts/2>un 11 15:46
> mike p>s/4 ay 20 17:28
> mike>>ts/5 ay 23 09:53
> mike pts/6 ay 28 16:57
> mike pts/7 un 12 13:36
> mike pts/8 un 13 09:15
> test pts/8 un 12 19:58 (localhost:10.0)
> mike pts/10 Jun 12 16:00
> mike pts/14 Jun 12 10:11
>
> There are 20 users are logged in,

What? Your output shows no such thing. It shows 2 root windows
running a shell other than tsch (most systems use sh, Linux tends
to use bash for root), mike running several including one th>t is
su'd to test, test running one, >nguyen5 running one. That's four
accounts with 12 login sessions. A>ain you have not shown output
of why you think there are 20 users logged in, and again it looks
like you do not know what "login session" means.

> and working on the system. However,

I have no idea why you think there are 20 users since you listed
4 users in 12 login sessions. Please show the output of why you
think the number 20 applies.
 
 
 

who and finger command not working properly

Post by beta » Sun, 15 Jun 2008 05:15:42

n Jun 13, 11:47 am, Doug Freyburger < XXXX@XXXXX.COM > wrote:

Let I make it clear, one user can have many 'login session'. I just
know (head count) that there are 20 users are logged in my system, the
problem is I can not see all of them on my terminal.



If I could see all 20 users, I would not ask for help!



 
 
 

who and finger command not working properly

Post by ibuprofi » Thu, 19 Jun 2008 12:16:15

On Fri, 13 Jun 2008, in the Usenet newsgroup comp.unix.admin, in article


NOTE: Posting from groups.google.com (or some web-forums) dramatically
reduces the chance of your post being seen. Find a real news server.


You may want to review the man page[s] for your shell[s] as a login
session has a specific meaning.

It helps to identify the actual operating system, and in your case,
the google headers suggest Red Hat Linux of some form.

The clue you want is in the utmp(5) or wtmp(5) man page.

DESCRIPTION
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.

Some of your users are logging in using a program/application that
is not configured to log to utmp/wtmp. So, what are you trying to do
and what _else_ have you tried? 'ps aux | cut -d' ' -f1 | sort -u'
might provide the information you are looking for.

Old guy