34,333
edits
Changes
→Modifying an Ubuntu Linux Group
== Modifying an Ubuntu Linux Group ==
[[Image:ubuntu_linux_group_properties.jpg]]
To add a group from the command line, use the ''addgroup'' utility. For example:
<pre>
sudo addgroup accounts
</pre>
To add an existing user to an existing group:
<pre>
sudo adduser john accounts
</pre>
== Deleting a Group from an Ubuntu Linux System
A group may be deleted from a system using the ''delgroup'' utility:
<pre>
sudo delgroup accounts
</pre>
Note that if the group to be deleted is the primary group for any user it cannot be deleted. A group can be deleted only if it is empty using the following command:
<pre>
sudo delgroup --only-if-empty accounts
</pre>
To remove a user from membership fof a group use the following command syntax:
<pre>
sudo deluser john accounts
</pre>