The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.

Things look quiet here. But I've been doing a lot of blogging at because I prefer WordPress now. Not all my posts there are FreeBSD related. I am in the midst of migrating The FreeBSD Diary over to WordPress (and you can read about that here). Once the migration is completed, I'll move the FreeBSD posts into the new FreeBSD Diary website.

uptime, w, and who show nobody logged in 2 November 2000
Need more help on this topic? Click here
This article has 5 comments
Show me similar articles
I was working on a box for a client.  They asked me to help.   After fixing the problem, I checked to see if the client was still logged in.   Here's what I saw:
[root@p100:/var/log] # who
[root@p100:/var/log] # w
9:21PM  up  5:18, 0 users, load averages: 0.08, 0.09, 0.03
 USER             TTY      FROM              LOGIN@  IDLE WHAT

That's wrong.  You can't issue a who or a w and get no users.  You're logged in.   You should at least see you.  uptime gave similar incorrect information.

Actually, you can be logged in and not seen.  Here are the various things people have mentioned:

  • screen will let you do this, using the deflogin off option in your screen rc.  add a chmod 711 ~; touch .nofinger and you're pratically invisible

My first thought was: someone has root'd this box.

So I asked on IRC and was told that it seems that my /var/log/wtmp is screwed.  DOH!

So I logged out and back in again.  Then everything worked:

[root@p100:/var/mail] # who
dan              ttyp1   Nov  1 21:24   (
[root@p100:/var/mail] # uptime
 9:50PM  up  5:47, 1 user, load averages: 0.00, 0.01, 0.00
The explanation is easy.  The problem I was fixing was a full /var filesystem.  That meant the contents of /var/log/wtmp was incorrect.   It's updated each time someone logs in.  By logging out and back in again, that file was updated correctly.
Need more help on this topic? Click here
This article has 5 comments
Show me similar articles