How to Change a User Group Command Line

Groups are subsets of the larger Linux or Unix user population. Each user belongs to at least one group but may belong to more than one group. A user's group defines his access to certain files and his ability to execute certain commands or perform certain system functions. Once a user is added to a system, the "usermod" command is used to change the user's default and secondary groups as well as other information such as login shell and home directory.

Instructions

    • 1

      Open a terminal window. The terminal window will be found in the operating system's main "Application" menu, under either "System Tools" or "Utilities." You will be presented with a command prompt where you will type the following commands.

    • 2

      Type the command "su" to switch to the root user. You must have root privileges to change user groups.

    • 3

      Issue the command "usermod -g newgroup mary" to change default group to "newgroup" for the user "mary."

    • 4

      Type the command "exit" to exit the root session.

Tips & Warnings

  • Issue the command "usermod -Ga Other mary" to add the user "mary" to the "Other" group as well as to leave her in the "newgroup" group,

Related Searches:

References

Comments

You May Also Like

Related Ads

Featured