Article Title: galloping in the Linux World-Linux System Management 1. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Each Linux system has at least one person responsible for system maintenance and operations, which is the system administrator. PC users can have multiple roles as both users and system administrators. The role of the system administrator is to ensure that the system operates smoothly and executes various tasks that require special privileges. Specifically, the system administrator should do the following:
◆ Set up the entire computer system, including hardware and software, such as installing hardware devices, installing operating systems and software packages, and creating accounts for users.
◆ Perform proper backup (regular file copy in the system) and recovery as needed.
◆ Handle problems arising from the use of limited computer resources (such as disk space and number of processes.
◆ Eliminate system communication (network) congestion caused by connection problems.
◆ Upgrade and maintain the operating system.
◆ Provides regular support for users.
Depending on the system size and number of users, the system management work can be much less, it can be a daily task at any time, or it may be a daily or even monthly maintenance work. If the system is small, the maintenance work can be carried out continuously. The system administrator must work conscientiously and responsibly. He has the privilege to control system operation. If he is careless, the system performance will be affected and even the system will crash.
User and workgroup Management
To access the Linux system, all new users must create an account in advance by the system administrator. User Accounts help system administrators record people who use the system and control their access to system resources. Account Management also helps organize user files and control other users' access to them. In this way, managing and maintaining user accounts, passwords, and permissions becomes an important part of the daily work of system administrators.
User Account
When using Linux, you must ensure that you are a legal user authorized by the system. Managing User Accounts, passwords, and access permissions is an important part of the daily work of the Linux system administrator.
In Unix/Linux systems, the concept of user accounts has a variety of meanings, the most important of which is based on identity authentication and security reasons. The system must differentiate the users who use machines. The account concept provides a way to differentiate users. In the system, each user has a personal account, and each account has a different user name and password. Users can set protection for their files to allow or restrict others' access to them.
In addition to an ordinary personal account, there must also be an advanced user who can manage the system. For example, the root account is the default account used by the system administrator to maintain the system. In addition, there are some special accounts in the system that cannot interact with people, such as bin and sync.
(1. passwd file)
In Linux, users' key information is stored in the system's/etc/passwd file. Each valid user account of the system corresponds to a row of records in the file. This line of records defines the attributes of each user account. The following is an example of a passwd file (partial excerpt ):
In this file, the data segments of each row of user records are separated by ":", which defines various user attributes. The order and meaning of each field are as follows:
Registration Name: Password: User ID: Group ID: User name: User main directory: Command Interpreter
(1) Registration Name (login_name): used to distinguish different users. The registration name is unique in the same system. In many systems, this field is limited to 8 characters (letters or numbers). Note that letters are usually case sensitive in Linux. This is different from ms dos/Windows.
(2) passwd: The system uses a password to verify the validity of the user. Super User root or some advanced users can use the system command passwd to change the passwords of all users in the system. Common users can also use the passwd command to change their passwords after logging on to the system.
In current Unix/Linux systems, passwords are no longer directly stored in the passwd file. Generally, the password field in the passwd file is replaced by an "x, use/etc/shadow as a real password file to save data including personal passwords. Of course, shadow files cannot be read by common users. Only Super Users have the right to read them.
In addition, it should be noted that if the first character in the passwd field is "*", it means that the account is blocked and the system does not allow users with this account to log on.
(3) User ID (UID): UID is a numerical value and the only user ID in Linux system. It is used to distinguish different users. Use the UID field to manage processes and file protection in the system. In Linux, both the registration name and UID can be used to identify the user, but the UID is more important for the system. For users, the registration name is more convenient to use. For some specific purposes, there may be multiple users with different registration names but the same UID in the system. In fact, these users with different registration names are actually the same user.
(4) group ID: This is the default workgroup ID of the current user. Multiple users with similar attributes can be assigned to the same group. Each group has its own group name and is distinguished by its own group ID. Like UID, the user's group ID is also stored in the passwd file. In modern Unix/Linux, each user can belong to multiple groups at the same time. In addition to specifying the basic group in the passwd file, you can also specify a group of users in the/etc/group file.
(5) user_name: contains information about the user, such as the real name, office address, and contact number of the user. In Linux, mail, finger, and other programs use this information to identify the users of the system.
(6) user home directory (home_directory): this field defines the Home Directory of an individual user. After a user logs on, his Shell uses this directory as the working directory of the user. In Unix/Linux systems, the root working directory is/root, while other individual users have their own independent working environments under the/home directory, the system configures its own home directory for each user in this directory. Files of individual users are stored in their respective home directories.
(7) Shell: Shell is the name of a program that runs when you log on to the system. It is usually the full path name of a Shell program, such as/bin/bash.
After a user logs on, the program is started to receive user input and execute the corresponding commands. From the perspective of Linux core, Shell is an intermediate layer for users to communicate with the core. It is used to interpret the command strings entered by users as system calls or interrupt subroutines that the core can understand, at the same time, the core work results are interpreted as visualized output results that users can understand. Therefore, for users, Shell is called a command interpreter, while for the core, Shell is also called a Shell program.
Note that the system administrator usually does not need to directly modify the passwd file. Linux provides some account management tools to help the system administrator create and maintain user accounts.
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