Solved

Unix "who" command is inaccurate

Posted on 2011-03-21
2
494 Views
Last Modified: 2013-12-23
Within AIX when I do a simple "who" command, the system replies back with the users that are logged on plus others that are definately not logged in. I have done a ps -ef| grep "USER" and the result is always nothing. In addition, looking at netstat, the users are not connected either.

Any ideas on why this occurs and how I go about correcting it?
0
Comment
Question by:ScubeduFan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 500 total points
ID: 35187246
Hi,

this is a known blur in the processing of the /etc/utmp file in AIX. This file holds user process entries.
The problem is that when a user process terminates its entry in /etc/utmp is not always cleaned up.

Since this is a known problem there is a workaround, in the form of a dedicated cleanup daemon called "utmpd".

utmpd monitors the /etc/utmp file for validity of the user process entries at regular intervals and removes orphaned entries by cross checking the process id of the entry against the process table.

Log in as root and add to /etc/inittab:

utmpd:2:respawn:/usr/sbin/utmpd

and issue "telinit 2" to have the daemon respawned.

The default scan interval is 300 seconds. You can set the interval to let's say 180 seconds by adding this value as a commandline parameter to utmpd:

utmpd:2:respawn:/usr/sbin/utmpd 180


wmp
0
 

Author Closing Comment

by:ScubeduFan
ID: 35327052
wmp ... thank you so much for this answer. You are truly a AIX guru. Your answer has saved me from countless issues. (sorry it took so long to accept the answer - my membership expired on me)
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to secure access to a folder on windows server 2008 R2 6 68
Bandwidth cap???? 8 63
Skype for Business server 6 48
WSUS Cannot Sync with Microsoft Update 4 30
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
If you're not part of the solution, you're part of the problem.   Tips on how to secure IoT devices, even the dumbest ones, so they can't be used as part of a DDoS botnet.  Use PRTG Network Monitor as one of the building blocks, to detect unusual…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question