1824219 Members
4072 Online
109669 Solutions
New Discussion юеВ

Refreshing who list

 
Andy Westlake_1
New Member

Refreshing who list

I run a D220 HP-UX 10.20 that various users connect to using Facetwin terminal emulation to access a database.
Now some lovely users instead of exiting gracefully use the Windows X button, which leaves ophaned sessions. Now I run a job to remove these sessions overnight but seem to be left with entries in the list produced by who command. There are no process connect to the user id or the terminal used.
So my question is how do you update the who list and get rid of these bogus entries please.
6 REPLIES 6
Andreas Voss
Honored Contributor

Re: Refreshing who list

Hi,

with fwtmp(1M) you can convert the "who file" (/etc/utmp) to ascii, remove the obsolete users and convert back to binary ie:

/usr/bin/acct/fwtmp /tmp/utmp.asc
vi /tmp/utmp.asc
/usr/bin/acct/fwtmp -ic /etc/utmp

Regards
Pete Randall
Outstanding Contributor

Re: Refreshing who list

I have a similar situation. Some people just don't log out at all and leave processes running, which can be cleaned up with a kill script. Others manage to leave no processes, yet their login shows in a who list. If I were you, I wouldn't worry about it - if there's no processes associated with their login, they're not doing any real harm.

Pete

Pete
Andy Westlake_1
New Member

Re: Refreshing who list

Andreas
I have already renewed the wtmp and utmp files in an effort to get rid of the entries but to no avail.

Pete,
Yeah I know they're not causing any problems but being ever so slightly anal retentive I'd like it to be cleared.

But many thanks for you replies so far guys.
harry d brown jr
Honored Contributor

Re: Refreshing who list

First offense:
written warning

Second:
remove their mouse from their PC.

Third:
remove their login account!

live free or die
harry
Live Free or Die
Andy Westlake_1
New Member

Re: Refreshing who list

Harry,

Call me Mister Softy but I just can't bring myself to get nasty with users. Sides which keeping them productive pays me my monthly wage.

Andy.
W.C. Epperson
Trusted Contributor

Re: Refreshing who list

And give that man 10 points for his remark on his own question!

I think we all need to remember that we're not gatekeepers, we're stewards and enablers. We get paid fairly nicely for helping other people accomplish the real work of the organization. Generally it's not appropriate to get nasty with a customer unless he's proactively misbehaving.
"I have great faith in fools; self-confidence, my friends call it." --Poe