User accounts: Difference between revisions

Jump to navigation Jump to search
→‎Add a user to a group: Remove a user from a group
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 ==


<syntaxhighlight lang="bash">
<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
</syntaxhighlight>
</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 ==

Navigation menu