Newsgroups: comp.unix.sco.misc From: Bela Lubkin <belal@sco.com> Subject: Re: Unusual utmp problem Cc: James Szabadics <jmsz@wespine.com.au> Date: Fri, 5 Oct 2001 18:14:16 GMT Message-ID: <20011005111416.O5148@mammoth.ca.sco.com> References: <3bbd2c88.9928998@news.highway1.com.au> James Szabadics wrote: > Using SCO 5.0.5 > > When using the who command I noticed that users were being listed even > though they were no longer logged in. > > Further investigation revealed that utmp was only updating for login > but not for logout. This meant that all current users are listed but > the who listing may also contain users who are NOT logged in. > > I am forced to use the "w" command to see who is really logged in - it > shows the current programs that the users are running - any user with > a blank in this area is usually not logged in. > > This also causes problems with the "wall" command and I imagine any > other command that uses utmp. > > Restarting the system clears utmp but what process is not happening > during logout to update utmp?? What has gone wrong and how do I fix > it?
Are you saying that this doesn't get cleared up even after a reboot? See whether the same problem happens for console logins (flip to multiscreen 3 -- Ctrl-Alt-F3 -- login, logout, see if utmp still shows tty03 logged in). Two files record the utmp information: /etc/utmp and /etc/utmpx. They should have the same contents, but in a different record structure. utmp records are 36 bytes while utmpx records are 368 bytes. The number of records should be approximately the same as the output of `who -a | wc -l`. _Some_ programs which write to utmp and utmpx insist that the files be an even multiple of their record size. So if utmp was 3600 bytes long, one of these programs would update it; but if it was 3601, it would assume the file was corrupted, and leave it alone. I forget which programs have this sensitivity and which don't. In any case, rebooting should clear both files to 0 bytes, a blank slate which should not have any corruption... >Bela<
Have you tried Searching this site?
Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates
This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.
Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.
Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.
We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.
Click here to add your comments
Don't miss responses! Subscribe to Comments by RSS or by Email
Click here to add your comments
If you want a picture to show with your comment, go get a Gravatar