Gpasswd command in linux

Source: Internet
Author: User

Gpasswd command function in linux: Management Group usage: gpasswd [-a user] [-d user] [-A user,...] [-M user,...] [-r] [-R] groupname parameter:-a: Add User to group-d: delete user from group-A: Specify administrator-M: the purpose of the specified group member is similar to that of-A.-r: Delete the password-R: restrict user logon to the group. Only members in the group can use newgrp to join the group gpasswd groupname: if the system has a peter account that is not a member of the groupname group, you must enter a password to use newgrp to temporarily add users to the group, the file group created by peter will also be groupname. Therefore, this method allows peter to use another group when creating files, instead of the group where peter is. Therefore, you can use gpasswd groupname to set the password so that those who know the group password can temporarily switch to those who have the groupname group function. gpasswd-A peter users, so that peter is the administrator of the users group, you can perform the following operations: gpasswd-a mary usersgpasswd-a allen users note: to add a user to a group, you can use the usermod-G group_name user_name command to add a user to the specified group, but the previously added group will be cleared. Therefore, when you want to add a user to a group and retain the previously added group, use the gpasswd command to add the user: gpasswd-a user_name group_name when you design the website, in many cases, multiple Programming devices are used together to compile, design, and modify data. At this time, we need to set the resource to have designated personnel who have administrative rights, in windows, we can use the security of data cartridges for control, and there are similar features in Linux. towns heard the UPG (User Private Group) feature during the last minute. Next we will explain it with instructions. The UPG (User Private Group) function is easy to manage. You only need to use a single command to complete the operation, the following describes how to use the command gpasswd <group> <= create a specific group secret gpasswd-A <user> <group> <= Add a user to A specific group gpasswd- <user> <group> <= Add a manager to a specific group gpasswd-d <user> <group> <= remove the user gpasswd-r <group> <= except the group key secret, gpasswd-R <group> <= add to the group key secret (used with gpasswd <group> secret) gshadow group name organization: group secret: Delegate administrator: group members, group name organization: group secret: group generation secret: group member newgrp example today there is a new case, to design a thing platform (Platform), there are three programming languages (towns01, town S02, towns03) to create a program together, towns needs to open an empty space to provide three programmers to enter that space at the same time, and there are some management rights. Towns creates a resource and group, set towns as the Group Administrator mkdir/sellgroupadd sellgpasswd-A towns sellusermod command usermod-a-G root towns ==> to add towns to the root group, so that towns has the root permission to limit this command can also be resolved to the result, such as gpasswd-a <user> <group>.

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.