In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains the "Linux gpasswd command use case analysis", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "Linux gpasswd command use case analysis" bar!
Linux common commands gpasswd commands are workgroup files / etc/group and / etc/gshadow management tools under Linux.
Tools for managing workgroup files under gpasswdLinux
Syntax gpasswd (options) (parameters) option-a: add users to the group;-d: delete users from the group;-A: specify administrators;-M: specify members of the group for similar purposes as-A;-r: delete passwords;-R: restrict users from logging into the group, and only members of the group can join the group using newgrp. Parameter group: specifies the workgroup to manage.
For example, if the system has a peter account that is not a member of the groupname group, you need to enter a password to use newgrp.
Gpasswd groupname allows users to temporarily join as members of the group, and then the file group created by peter will also be groupname. So this approach temporarily allows peter to use other groups when creating files, rather than the group in which peter itself belongs.
So use gpasswd groupname to set the password, so that people who know the group password can temporarily switch to the groupname group function.
Gpasswd-A peter users so that peter is the administrator of the users group and can do the following:
Gpasswd-a mary users gpasswd-an allen users Note: you can use the command usermod-G group_name user_name to add a user to a specified group, but the previously added group will be emptied.
So when you want to add a user to a group while keeping the previously added group, use the gpasswd command to add the action user:
Gpasswd-a user_name group_name thank you for your reading, the above is the "Linux gpasswd command use case analysis" content, after the study of this article, I believe you have a deeper understanding of the use of Linux gpasswd command example analysis of this problem, the specific use also needs to be verified by practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.