---
title: "管理用户分组的命令gpasswd"
author: "dongwei_6688"
date: "2012-10-26T11:40:08Z"
tags: []
categories: ["操作系统"]
slug: "gpasswd"
draft: false
lastmod: "2012-10-26T11:47:23Z"
id: 1705850
url: "https://dongwei.iteye.com/blog/1705850"
---

**NAME：** gpasswd - administer the /etc/group file

**SYNOPSIS：**

gpasswd group

gpasswd -a user group

gpasswd -d user group

gpasswd -R group

gpasswd -r group

gpasswd \[-A user,...] \[-M user,...] group

 

**OPTIONS：**

Group administrator can add and delete users using **-a** and **-d** options respectively.

Administrators can use **-r** option to remove group password. When no password is set only group members can use newgrp to join the group.  
Option **-R** disables access via a password to the group through newgrp command (however members will still be able to switch to this group).