GCIH · Question #661
Which UNIX log file contains information about currently logged in users?
The correct answer is A. wtmp. The wtmp log file on UNIX systems records all login and logout events, serving as the persistent historical record of user session activity.
Question
Which UNIX log file contains information about currently logged in users?
Options
- Awtmp
- Bbtmp
- Cutmp
- Dlastlog
How the community answered
(39 responses)- A90% (35)
- B3% (1)
- C5% (2)
- D3% (1)
Why each option
The wtmp log file on UNIX systems records all login and logout events, serving as the persistent historical record of user session activity.
wtmp is the binary log file that records all login and logout events on UNIX/Linux systems; commands such as 'last' read wtmp to display user session history, making it the primary log associated with user login information. It captures a running history of who logged in, from where, and when sessions ended, covering both current and past sessions.
btmp records only failed login attempts, not successful logins or currently active sessions.
utmp tracks only real-time active (currently logged-in) user sessions and is overwritten as sessions change, rather than maintaining a cumulative log.
lastlog records only the single most recent login timestamp per user account, not a comprehensive log of login activity across the system.
Concept tested: UNIX authentication and session log file identification
Source: https://man7.org/linux/man-pages/man5/wtmp.5.html
Topics
Community Discussion
No community discussion yet for this question.