w/who command returned zero users


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users w/who command returned zero users
# 1  
Old 10-16-2003
w/who command returned zero users

Hi ppl,

We are using Sun OS and recently, encountered this strange problem.

When issuing the "w" or "who" command, the system produce no listing. See screen shot below.

-----------------------
$ w
2:56pm up 2 day(s), 21:10, 0 users, load average: 1.03, 0.75, 0.69
User tty login@ idle JCPU PCPU what
$

---------------------------

There are users logging into the system but the "w" command shows that there are 0 users.

How could be problem here ? Please advice.

Thanks
# 2  
Old 10-16-2003
users

Hi,

can you perform the finger commando ? What is it reporting ? How are the users connected ? Default network login ? Or some special kind of login ?

Did you reboot the system and tested again ?

I know, if you are logged in with some kind of script, not using the default login prog, the system will not recognize you.

May be a little bit more details is usefull :-)

Regards
malcom
# 3  
Old 10-16-2003
Thanks malcom,

Yes the are users logging in (see "last" output). "finger" said no one logged on ??.

We are using the default network login. The server was rebooted 2 days ago with missing /proc directory. I have to create the /proc directory manually else the "w" command will return an error "/proc missing file or directory ... sometime like that". Now that the /proc is created, "w" command does return any error message other than the "0 users" problem.

---------------------------------
$ last -n 10
informix pts/21 192.xx.x.xxx Thu Oct 16 15:36 - 15:38 (00:01)
rnd pts/13 192.xx.x.xxx Thu Oct 16 15:31 - 15:33 (00:02)
rnd pts/6 192.xx.x.xxx Thu Oct 16 15:29 - 15:33 (00:04)
eir pts/38 192.xx.x.xxx Thu Oct 16 15:18 - 15:18 (00:00)
eir pts/18 192.xx.x.xxx Thu Oct 16 15:17 - 15:18 (00:00)
eir pts/5 192.xx.x.xxx Thu Oct 16 15:17 - 15:18 (00:00)
eir pts/11 192.xx.x.xxx Thu Oct 16 15:02 - 15:03 (00:00)
rnd pts/36 192.xx.x.xxx Thu Oct 16 14:46 - 14:48 (00:02)
eir pts/41 192.xx.x.xxx Thu Oct 16 14:35 - 14:38 (00:02)
informix pts/12 192.xx.x.xxx Thu Oct 16 14:33 - 14:38 (00:04)

$ finger
No one logged on

$ finger rnd
Login name: rnd In real life: RND Staff Only
Directory: /export/home/rnd Shell: /bin/sh
Last login Thu Oct 16 15:31 on pts/13 from 192.168.1.144
No unread mail
No Plan.

$ w
3:47pm up 2 day(s), 22:01, 0 users, load average: 1.00, 0.93, 0.91
User tty login@ idle JCPU PCPU what
-----------------------------

Regards
# 4  
Old 10-16-2003
Hi,

What you are showing now with "last -n 10" is that lot's of users were logged in, but now anymore. It displays starting-time and time of logout. between the "(" it shows the total time they have been logged in, only a couple of minutes, so therefor you can only make a good example of it when someone really is logged in.
If one is "last -n 10" displays (still logged in) and of course no time of logout.

Example:
g1161d ftp server1 Thu Oct 16 10:00 still logged in
g1161d ftp server1 Thu Oct 16 09:47 - 09:47 (00:00)
sys007 pts/tc server1 Thu Oct 16 08:30 still logged in

Note that "w" and "who" are have different output. Perderabo made a very interesting remark about it once, but I can't find it anymore Smilie

Anyway, hope to have been of any help.


Regs David
# 5  
Old 10-16-2003
Depending on your release, who reads either /var/adm/utmp or /var/adm/utmpx. Which ever it is, it must exist and be world readable. If /proc was missing, maybe /var/adm was also trashed?
# 6  
Old 10-17-2003
wtmp or utmp may have the wrong permissions, or may be corrupted. telnetd has been known to cause corruption issues.

Try this at your own risk:

With no users on your system, take backup copies of wtmp and utmp. Delete wtmp and utmp. Then try logging on a few sessions and see if the output is correct. Make sure the files have been re-created at this point. If not, some unix flavors require you to do a touch and recreate the files.
# 7  
Old 10-21-2003
fyi,

it used to be a hack back in the day to erase your login from the mentioned files so you can "ghost" around in the system.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

sort file returned by FIND command in ascending

Hi there I have to enhance my current file looping to ensure the oldest file being processed first. current command: for FILENAME in `find $MY_DIRECTORY -follow -type f` I manage to get command for order by date modified descending, just can't get the ascending order. Please help for... (3 Replies)
Discussion started by: elsie512
3 Replies

2. UNIX for Dummies Questions & Answers

Assigning the output of a command to a variable, where there may be >1 line returned?

Hello I am using unix CLI commands for the Synergy CM software. The command basically searches for a folder ID and returns the names of the projects the folder sits in. The result is assigned to a variable: FIND_USE=`ccm folder -fu -u -f "%name"-"%version" ${FOLDER_ID}` When the command... (6 Replies)
Discussion started by: Glyn_Mo
6 Replies

3. Shell Programming and Scripting

'who' command -- getting data returned into variables (in bash)

Anyone know how to get the data out of the "who" command? I'm still in lukewarm pursuit of creating an OS X-like welcome message at the start of any Terminal session, sans having to use either bash login or calling up ssh. My trials & errors and surfing around have narrowed it down for me... (1 Reply)
Discussion started by: SilversleevesX
1 Replies

4. Shell Programming and Scripting

number of lines returned from a grep command

hi all, from a shell (ksh) script, i am doing a 'grep'. how do i find out the number of lines returned from that 'grep' command ?? thanks in advance. (4 Replies)
Discussion started by: cesarNZ
4 Replies

5. Shell Programming and Scripting

Retrive the value returned by a command excuted in a remote server using ssh

Hello Everybody, I'm facing a weird problem with the awk command. I try to retrieve in a variable the value returned by a simple ls command. ls /export/home/tmp |tail -1 return a good value (the name of the . But When I try to execute the same command in a remote server using ssh as... (2 Replies)
Discussion started by: Jabarod
2 Replies

6. Shell Programming and Scripting

How to find out command has returned any value?

Hi Pals I am using this command in my script to find out warnings using fgrep where $log is the log file name, $date is the date to be searching and warnings.list contains list of matching words. grep "WARNING" $log|grep "$date"|fgrep -vf warnings.list I want to perform another action... (1 Reply)
Discussion started by: johnl
1 Replies

7. HP-UX

returned from remote command

Hi, there, I want to excute the remote command shell via "remsh", are there any simple or best way to get the result of remote shell from local ? thanks. (2 Replies)
Discussion started by: Frank2004
2 Replies

8. UNIX for Dummies Questions & Answers

Problem with files returned using Find command

When I enter the command below grep appears to be returning a file it shouldn't. find . -name "*.*" -exec grep "testing" {} /dev/null \; :tps3Mailfile ./SSI.ksh: # create TECHOUT dummy for test for testing purposes ./ftprimi1.ksh:# before running job in prod... change FTP to go to rimi... (3 Replies)
Discussion started by: dfb500
3 Replies

9. UNIX for Dummies Questions & Answers

Copying file names returned from a grep command into another directory

When I do the following : grep -l "string" *, I get a list of file names returned. Is there a way to copy the files returned from the list into another directory ?. Thanks. (4 Replies)
Discussion started by: Kartheg
4 Replies

10. Shell Programming and Scripting

Incorrect Exit Status Returned from FTP command - Help??

I am trying to perform some error handing within a Korn sheel script whilst FTPing a file from one server to another.. The exit status is correctly set to zero, if my script connects to the other server and sends the file.. However, if for whatever reason other than a timeout the script... (3 Replies)
Discussion started by: frustrated1
3 Replies
Login or Register to Ask a Question