Modify the group to which a user belongs in Linux

angryTom
Release: 2020-02-06 09:55:47
Original
7708 people have browsed it

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 用户组 用户名
Copy after login

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

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

usermod -a -G 用户组 用户名
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template