Re: Question: where is utmp entry deleted at logout?
Yuri Kozlov <[email protected]> Wed, 12 Oct 2005 09:13:51 +0400
| Newsgroups | gmane.linux.pld.shadow.general |
|---|---|
| Message-ID | <[email protected]> |
2005/10/11, Stef Bon <[email protected]>: > Hello, > > I'm looking in the code of login of the latest versions of shadow > (4.0.11/4.0.13) for the code where the utmp-record is deleted when the login > session ends. > > I've found in the source where the utmpentry (shadow-4.0.13, login.c line 903 > with PAM) is written when logging in, but where is it deleted? > (I assume records are deleted when a session ends) from login.1 The login program is NOT responsible for removing users from the utmp file. It is the responsibility of getty(8) and init(8) to clean up apparent ownership of a terminal session. If you use login from the shell prompt without exec, the user you use will continue to appear to be logged in even after you log out of the "subsession". -- Regards, Yuri Kozlov