How to Change Group Settings in Linux

How to Change Group Settings in Linux thumbnail
Group settings help secure your system.

One of the core security features of Unix-based operating systems, such as Linux, is its distribution of files and system functions across individual user and user-group ownership and permissions. You can access files if your user account owns the file outright, or if your user belongs to a user group that is authorized to access the file. In Linux, system administrators can easily modify group membership and ownership settings through the command line terminal.

Instructions

  1. Open Terminal

    • 1

      Locate the terminal emulator by entering your system's main menu and click on the "Terminal" icon. It will be located either under the "Accessories" or "System" sub-menu.

    • 2

      Enter super-user mode to perform administrative tasks by typing "su" into the terminal line.

    • 3

      Type the administrative password into the terminal. You will now be in super user mode and able to change group settings.

    Change Group Settings

    • 4

      Create a new group by typing "groupadd mygroup" into the terminal where "mygroup" is the name of the group you wish to create.

    • 5

      Add a given user to a group with the "usermod -G group user" where "group" is the name of the group to which you want to add the user, and "user" is the name of the user you are adding to that group.

    • 6

      Give ownership of a file to a particular group by typing "chgrp group file" where "group" is the name of the group you want to own the file and "file" is the directory path to the file for which you are changing the ownership. If you want to change the ownership of an entire directory, and all the files in it, type "chgrp -R group directory" where "directory" is the path to the target directory.

Related Searches:

References

  • Photo Credit Comstock/Comstock/Getty Images

Comments

You May Also Like

Related Ads

Featured