40LOGIN ACCOUNTING
Login accounting is concerned with recording which users are currently logged in to the system, and recording past logins and logouts. This chapter looks at the login accounting files and the library functions used to retrieve and update the information they contain. We also describe the steps that an application providing a login service should perform in order to update these files when a user logs in and out.
40.1 Overview of the utmp and wtmp Files
UNIX systems maintain two data files containing information about users logging in and out of the system:
• The utmp file maintains a record of users currently logged in to the system (as well as certain other information that we describe later). As each user logs in, a record ...
Get The Linux Programming Interface now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.