Confusion about the cancellation process.

Source: Internet
Author: User
Confusion about the cancellation process. -- Linux general technology-Linux programming and kernel information. The following is a detailed description. An article on the internet is as follows:
At login, the login program fills in such a structure, writes it to the utmp file, and adds it to the wtmp file. During logout, The init process erases the corresponding records in the utmp file (each byte is set to 0) and adds a new record to the wtmp file. Read the logout record in the wtmp file, and the ut_name field is cleared to 0. When the system is restarted, and before and after the system time and date are changed, special record items are added to the wtmp file.
I have two questions:
1. Since the ut_name field of the cancellation record in the wtmp file is cleared to 0 during cancellation, how can we know who logged out? Why clear the ut_name field?
2. When a user logs out, the user writes a cancellation record to the wtmp file. Does this record how long the user has logged on?
Thanks
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.