The who command

Mark McCulligh mmcculli at visualtech.ca
Thu Jun 29 19:10:16 UTC 2006


Rick Stevens wrote:

>On Thu, 2006-06-29 at 13:55 -0400, Mark McCulligh wrote:
>  
>
>>Rick Stevens wrote:
>>
>>    
>>
>>>On Thu, 2006-06-29 at 11:55 -0400, Mark McCulligh wrote:
>>> 
>>>
>>>      
>>>
>>>>Hi Group,
>>>>
>>>>When I log into my system and run the who command I get no users. If I 
>>>>look at my uptime is says 0 users. Plus if I view the lastlog file it 
>>>>looks like it is corrupt.  How I am fix this?
>>>>   
>>>>
>>>>        
>>>>
>>>"who" is based on what's in /var/log/utmp or /var/log/wtmp.  If one of
>>>those files is not present, who can't report on users.  However,
>>>/var/log/wtmp is MANDATORY on Linux and is created by init if it does
>>>not exist.
>>> 
>>>
>>>      
>>>
>>I have tried using the root user. The wtmp file does exist but is 
>>blank.  Any ideas?
>>    
>>
>
>When you say "blank", what do you mean?  Remember that it's a binary
>file, so "cat" or "vi" are liable to spit out garbage or nothing.
>
>Can you post an "ls -l" of it?  It should look something like this:
>
>[root at prophead ~]# ls -l /var/log/wtmp
>-rw-rw-r--  1 root utmp 364416 Jun 27 15:42 /var/log/wtmp
>  
>
This is what I get:
[root at calonweb001 log]# lis -l /var/log/wtmp
-rw-rw-r--  1 root utmp 0 Jun  1 04:02 /var/log/wtmp

There is also a wtmp.1 file that also size 0.

Mark.

>----------------------------------------------------------------------
>- Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
>- VitalStream, Inc.                       http://www.vitalstream.com -
>-                                                                    -
>----------------------------------------------------------------------
>
>_______________________________________________
>Redhat-install-list mailing list
>Redhat-install-list at redhat.com
>https://www.redhat.com/mailman/listinfo/redhat-install-list
>To Unsubscribe Go To ABOVE URL or send a message to:
>redhat-install-list-request at redhat.com
>Subject: unsubscribe
>
>=============================================
>This email scanned by CanIt-PRO Spam/Virus
>
>
>
>  
>




More information about the Redhat-install-list mailing list