Linux User and user group settings, linux User Group

Source: Internet
Author: User

Linux User and user group settings, linux User Group

View the group to which the current user belongs

Groups

View the groups to which <user1>, <user2>, and <user3> belong.

Groups <user1> <user2> <user3>


Change the user's main user group or additional group

Usremod <user>-g <maingroup>-G <addgroup>


Differences between linux user groups and users

A group is like a community. A user is like a Member. Generally, a user created in linux automatically creates a group for the user by default, unless a group is specified, such as a user name: useradd fly: groupadd fly is automatically executed in the background at the same time. Therefore, this user belongs to the fly group. If multiple users are grouped into one group, this is especially good for ftp, samba, and other services. In this way, you only need to set permissions for the group, which also reduces a lot of background management troubles.

How to add a new user in Linux and set a password for the user

Useradd Username
Passwd User Name
Enter the password.

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.