User management in Ubuntu (1) user account

Source: Internet
Author: User
User management in Ubuntu (1) User account there are usually three types of users in Linux: superuser, regular user, and systemuser ). The UID and GID of the superuser are both 0. The UID of a regular user starts from 1000. System...
User management in Ubuntu (1) user account there are usually three types of users in Linux: super user, regular user, and system user ). The UID and GID of the superuser are both 0. The UID of a regular user starts from 1000. The UID of the system user ranges from 1 to 499, and also includes 65,534. Ubuntu usually creates different Gids for each UID larger than 1000. the system administrator can add other users to the same GID or create a new group, then add the user to the group. Ubuntu uses the/etc/passw file to save the user account information in the system. All users have an entry in the passwd file, saving the user name, the encoded password, the user ID (UID) and the group ID (GID ). The last two items are the user's/home directory and the default shell (/bin/bash ). No matter how many system administrators there are, there is only one super user account. A super user account usually refers to a root user who has full control over the system. The super user is unique, and the UID and GID of the super user are both 0. For example, root: x: 0: 0: root:/bin/bash www.2cto.com Ubuntu disables the superuser account by default, instead, the first user of the system can use the sudo command to obtain all permissions of the Super User. Therefore, the command prompt you usually see is ($). when you need to execute system management commands, you need to add sudo before the command, and then be prompted to enter the password. after entering the password, the Ubuntu system will execute this command, as if you are a Super User. In other Linux systems, when you want to enter the Super User root, enter the command su-nd, and then enter the super user password to see the super user command prompt (#). In Ubuntu, you can enter sudo-I, and then enter the password to see the super user command prompt (#). after you execute the relevant command, enter exit, and press enter, the system returns to the regular user prompt ($ ). In Ubuntu, superuser accounts are disabled by default. However, you can enable the superuser account by entering sudo passwd on the terminal, and then entering the root user name and password as prompted. The root account is enabled. Super users are not recommended to be enabled in Ubuntu because they often cause irreparable disasters when working with super user permissions. Regular users refer to users who log on to the Linux system but do not execute management tasks, such as text processing or sending and receiving emails. Super users can grant normal users the operation permission through the access permissions of files and directories. For example: cindy: x: 1000: 1000: cindy,:/home/cindy:/bin/bash here you can see that the password is located at x, but this is not the real encoded password. All passwords are encoded and stored in the/etc/shadow file. In the previous content, we know that each file has three permissions: rwx (read/write execution). For each file or directory, permissions are assigned to three types of targets: users, groups, and others. There are three common commands for file permission management: chgrp -- change the group to which the file or directory belongs chown -- change the user www.2cto.com chmod of the file or directory -- change the access permission of the file or directory. The system user is not a person, it is also called a logical user or a pseudo user. The system user does not have the corresponding/home directory and password. A system account is usually used by a Linux system to manage daily services. For example, the system user www-data owns the Apache web server and its related files. Only system users www-data and super users have access to these files. In passwd, the system user is represented as follows: www-data: x: 33: 33: www-data:/var/www:/bin/sh by lqhbupt.
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.