Home  >  Article  >  Operation and Maintenance  >  Modify the group to which a user belongs in Linux

Modify the group to which a user belongs in Linux

angryTom
angryTomOriginal
2020-02-06 09:55:477712browse

Modify the group to which a user belongs in Linux

Linux Modify the group to which a user belongs

1. Set the group to which a user belongs

usermod -g 用户组 用户名

Note: -g|--gid, modify the user's gid, the group must exist

2. Add the user to a certain group(s)

usermod -a -G 用户组 用户名

Note :

-a|--append, append users to certain groups, only used with the -G option

-G|--groups, append users to certain groups , only used with the -a option

(Online video tutorial sharing: linux video tutorial)

The above is the detailed content of Modify the group to which a user belongs in Linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn