editing 'wtmp' file

editing 'wtmp' file

Post by Peter Gro » Thu, 22 Sep 1994 00:02:49

Yesterday I had to 'kill' a users session on our SCO Unix box as there terminal
session had become detached from the host processes.

The problem was that the system (presumably the 'login' command) didn't tidy
up the wtmp entry after the kill.

The problem is made worse by the fact that when the user logs back in I have
put a check into their .profile that looks at the output from 'who' to prevent
them from logging in more than once.

As it was the end of the working day the problem was left unsolved until today.

This morning I find that the wtmp has been updated, and the user is able to log
back in again.


        1.      How can I manually edit the 'wtmp' file (it is a data file).

        2.      Has anyone got a program that can tidy this ?

        3.      What did the tidy up over-night ?

        4.      Is there a simple alternative for limiting user sessions ?

Thanks in advance.

Peter Gross, UNIX Systems Manager, Brighton Health Care NHS Trust, UK

BTW, the ideas, suggestions, jokes, fantasies, complaints, comments,
critiscms, cautions, insults, observations, diagrams, scripts, sarcastic
remarks, stories, programs, and thoughts shown in the text above are mine
and mine alone, and are NOT those of my employer or anyone else for that
matter (unless I say otherwise ;-).


1. Any user friendly 'editor like' to edit/generate TERMCAP files ?

 As per subject line, is there a user friendly 'editor/translator' for TERMCAP
 file. I mean something which is at least in part *English* and *not* the
 *hieroglyphical* text of TERMCAP (infocmp etc.)

 The sort of thing I am looking for will take my default TERMCAP settings and
 translate the set *acronyms* into English and slao let me know which have
 been defaulted or not set.

 { o'| `0 }                      |
    -~~-                         |      Tel      : (+44) (0235) 464533
     uu                          |
- Disclaimer: Please note that the above is a personal view and should not
  be construed as an official comment from the JET project.

2. Problem with file operation

3. What file do I edit to make 'switchdesk' see a newly-installed KDE 2??

4. token ring help!!

5. how to edit a very large file using 'vi'

6. Tricky SED matching and replace pattern for reformatting source codes brackets

7. 'cat file' but only if 'file' exist

8. Where is Elvis 1.8pl3 source?

9. Coverting '.so' files to '.o' files

10. File size of 'tmp' files for 'vi'

11. Filesystem tool in X won't 'edit'

12. "rm: can't unlink 'files'",can't delete files

13. 'still logged in' wtmp problem