In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article "Linux/etc/passwd file used to do what" most people do not understand the knowledge points of the article, so Xiaobian summarized the following content for everyone, detailed content, clear steps, with a certain reference value, I hope you can read this article to gain something, let's take a look at this article "Linux/etc/passwd file used to do what" article bar.
Each user has a record line in the Linux /etc/passwd file that records some basic attributes of the user. System administrators often have access to modifications to this file in order to manage users.
Its content is similar to the following example:
From the above example, we can see that one line of records in/etc/passwd corresponds to one user, and each line of records is separated into 7 fields by colons (:). Its format and specific meaning are as follows:
Username: Password: User Identification Number: Group Identification Number: Annotative Description: Home Directory: Login Shell
"User name"
A string representing the user account number. It is usually no longer than 8 characters long and consists of upper and lower case letters and/or numbers. Login names cannot have colons (:) because colons are delimiters here. For compatibility reasons, it is best not to include a dot character (.) in your login name, and does not start with hyphens (-) and plus signs (+).
"Password."
Some systems store encrypted user passwords. Although this field stores only the encrypted string of the user password, not plain text, it is still a security risk because the/etc/passwd file is readable by all users. As a result, many Linux systems (such as SVR4) now use shadow technology to store the real encrypted user password in/etc/shadow files, while only storing a special character in the password field of/etc/passwd files, such as "x" or "*."
"User identification number"
Is an integer used internally to identify users. In general, it corresponds to the user name one by one. If several user names correspond to the same user ID, they are treated internally as the same user, but they can have different passwords, different home directories, different login shells, and so on. Generally, the user identification number ranges from 0 to 65535. 0 is the identification number of root, 1~99 are reserved by the system as administrative accounts, and the identification numbers of ordinary users start from 100. In Linux, this limit is 500.
"Group identification number"
The field records the user group to which the user belongs. This corresponds to a record in the/etc/group file.
"annotative description"
The field records some personal information about the user, such as the user's real name, phone number, address, etc. This field has no practical use. The format of this field is not uniform across Linux systems. On many Linux systems, this field holds an arbitrary explanatory description text that is used as the output of the finger command.
"Home Directory"
This is the user's starting working directory, which is the directory where the user is located after logging into the system. In most systems, each user's home directory is organized under a specific directory, and the name of the user's home directory is the user's login name.
Each user has read, write and execute (search) permissions to his home directory, and other users have access permissions to this directory set according to specific circumstances. After the user logs in, a process is started, which is responsible for transmitting the user's operation to the kernel. This process is a command interpreter or a specific program that runs after the user logs in to the system, that is, Shell. Shell is the interface between users and Linux systems. There are many kinds of Linux shells, each with different characteristics.
Common ones are sh(Bourne Shell),csh(CShell),ksh(KornShell),tcsh(TENEX/TOPS-20 type CShell),bash(Bourne Again Shell), etc.
System administrators can specify a Shell for users based on system conditions and user habits. If Shell is not specified, the system uses sh as the default login Shell, i.e. the value of this field is/bin/sh. The user's login Shell can also be specified as a specific program (which is not a command interpreter).
Using this feature, we can restrict users to running only specified applications, and after the application runs, the user automatically exits the system. Some Linux systems require that only programs registered in the system appear in this field. There is a class of users called psuedousers, who also have a record in the Linux /etc/passwd file, but cannot log in because their login Shell is empty. They exist mainly to facilitate system management and meet the requirements of the corresponding system process for file ownership. Common fake users are shown below.
false user meaning
Includes:
bin has executable user command files
sys owns system files
adm owns account files
uucp UUCP Usage
lplp or lpd subsystem usage
Nobody uses NFS
Owns account files
In addition to the pseudo-users listed above, there are many standard pseudo-users, such as audit,cron,mail,usenet, etc., which are also required for related processes and files.
Because Linux /etc/passwd file is readable by all users, if the user's password is too simple or the law is obvious, an ordinary computer can easily crack it, so the security requirements are high.
Linux systems separate the encrypted password and store it separately in a file called/etc/shadow. Only superusers have read access to the file, which ensures the security of the user password.
The above is about "Linux/etc/passwd file used to do what" the content of this article, I believe everyone has a certain understanding, I hope the content shared by Xiaobian is helpful to everyone, if you want to know more related knowledge content, please pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.