1. Password File
Each system will have a file that records the username and password, usually/etc/passwd. This file includes: The root uin is usually 0. The X in the file is a placeholder, indicating that the real encryption password is saved in another file. If this column is not displayed, no password is set for the user.
When the user's shell is set to/dev/null, the user can be prevented from logging on to the system. At the same time, if you direct shell to/bin/false or/bin/true, the corresponding And log out. The current user password is usually located in a file called shadow password.
This password adopts one-way encryption and cannot be restored. You can use the getpwent (3), setpwent (3), and endpwent (3) functions to access password-related attributes. 2. Group Information For the group, there are also information about the file storage group, and corresponding functions to access the relevant information, which will not be summarized here. 3. Time Strfttime (3) allows you to conveniently customize the corresponding time attribute output.