-
user security files in Linuxlinux 2023. 2. 21. 10:44
In Linux, the files /etc/passwd, /etc/group, and /etc/shadow are important system files related to user accounts and authentication.
- /etc/passwd: This file stores the basic user information, including the username, user ID (UID), group ID (GID), home directory, and shell. It is readable by all users on the system, as it needs to be accessed for many system operations. However, it does not store user passwords, which are instead stored in the /etc/shadow file.
- /etc/group: This file contains the group information, including the group name, group ID (GID), and the list of usernames that belong to that group. Like /etc/passwd, it is also readable by all users on the system.
- /etc/shadow: This file stores the user password information in an encrypted form, making it only accessible to the root user. It contains the password hash and other password-related information, such as the last password change date and password expiration date.
From a security perspective, it is important to ensure that these files have appropriate permissions set to restrict access to sensitive information. The /etc/shadow file, in particular, should only be accessible to the root user, as it contains sensitive password information. Additionally, it is important to regularly audit and monitor these files to detect any unauthorized changes or access.
'linux' 카테고리의 다른 글
How to manage user password expiration information in Linux (0) 2023.02.21 How to manage your root user in Linux (0) 2023.02.21 How to change owner and owner group in Linux (0) 2023.02.21 How to add and delete group in Linux (0) 2023.02.21 How to add and delete user in Linux (0) 2023.02.21