Here is an example of an entry in an /etc/group file.
- The group is called artists, there is no password, the group ID is 101, and the users who are part of this group are vish, raj, suvarni, krithi and gokul.
- artists::101:vish,raj,suvarni,krithi,gokul
- As in the case of the /etc/passwd file, you can edit the /etc/group file directly using a text editor, unless you have implemented shadow security.
- Instead of using either Linuxconf or groupdel, you could simply delete the entry for that group in the /etc/group file.
- This can be risky, however, if you make accidental changes.
- If you have implemented shadow security measures, then group entries are kept in an encrypted /etc/gshadow file.
- You cannot edit this file. Changes can only be made through a utility like groupmod.
- To do so manually, create a directory for the group in the /home directory and change its group to that of the group, along with allowing access by any member of the group.
- The following example creates a directory called muroor and changes its group to that of the muroor group:
Example: mkdir /home/muroor
Example: chgrp muroor /home/muroor
The read, write, and execute permissions for the group level should be set:
Example: chmod g+rwx /home/muroor
- Any member of the muroor group can now access the /home/muroor directory and any shared files placed in the directory.
- This directory becomes a shared directory for the group muroor now. You can, in fact, use the same procedure to make other shared directories at any location on the file system.
Linux: Managing Users << Previous
Next>> Linux: Summary of some user and group related commands
Our aim is to provide information to the knowledge
seekers.