Linux system review memorandum 5

Source: Internet
Author: User
Linux system review memorandum 5 is the fifth article in this series of documents. I plan to cover the logon, hard disk, periodic process, and other content. First, let's take a look at login: 5.1 login users in the second article, we talked about the linux system boot process, this for the vast majority of users... information & Linux system review memorandum 5 This is the fifth article in this series of documents. I plan to cover logon, hard disks, periodic processes, and other content. First, let's take a look at the login: 5.1 login users in the second article, we talked about the linux system boot process, which is a transparent process for most users ., however, for logon, the operation is visible and tangible. During the login process, the system mainly involves two important files in linux:/etc/passwd and/etc/shadow. when the Passwd file is used, the system recognizes the user's list. The content consists of seven fields separated by colons. If you are interested, you can study by yourself. Here is just a general introduction. This file can be viewed by anyone. Although encrypted, it can be cracked. to avoid such embarrassment, in all versions of LINUX, users are allowed to hide the encrypted password in a separate file that not everyone can read. This file is called shadow. in the system, only the root user can read the content of this file. Compared with users, there is also the concept of user groups. This file is/etc/group. This file contains the UNIX group name and the list of members in each group. This file also has four fields for your reference. 5.2 since adding users involves users, there must be some operations such as adding and deleting users. in LINUX, adding users can be divided into manual and command methods, however, at present, there are very few people who will use the manual method. let's mention it here. 5.2.1 to add users in manual mode, follow these steps: 1. edit the passwd and shadow files to define the user account. 2. add the user to the/etc/group file; 3. set an initial password. 4. create the user's home directory and use chown and chmod commands to change the attributes. If you want to customize some commands and tools, you need to copy some startup files to the user's home directory. the startup file is generally a hidden property. in linux, it is a file name opened with dots. Let's take a look at the common startup files. How many steps do I need to delete a user in manual mode? 1. delete a user from the local user database; 2. delete a user from the aliases file; 3. delete the user's crontab file; 4. terminate the user process. 5. delete a user from the passwd, shadow, group, and gshadow files; 6. delete the user's home directory. the 5.2.2 command shows that manual operations are a disaster-like experience, which may not only cause errors, but also cause leaks. Therefore, we recommend that you use a comprehensive command method, it is simple and safe. Add User: useradd. this command can have many parameters. Delete User: userdel, and groupadd, groupmod, and groupdel commands that operate on user groups. This series of articles may be concise and rarely detailed in some things. One is that you are too lazy to type one by one, and the other is mainly to give yourself a general outline, if you forget it later, you can go back and flip it. if you cannot remember the details, you can check the manual.
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.