4,461
edits
m Mhan moved page Sysadmin:User accounts to User accounts: remove misleading namespace |
→Add a user to a group: Remove a user from a group |
||
Line 20: | Line 20: | ||
== Add a user to a group == | == Add a user to a group == | ||
< | <source lang="bash"> | ||
$ sudo adduser username groupname | $ sudo adduser username groupname | ||
or | or | ||
Line 26: | Line 26: | ||
or | or | ||
$ sudo usermod -a -G groupname username // for an existing user | $ sudo usermod -a -G groupname username // for an existing user | ||
</ | </source> | ||
== Remove a user from a group == | |||
<source lang="bash"> | |||
$ sudo gpasswd -d username groupname | |||
</source> | |||
== List a user's groups == | == List a user's groups == |