Knowee
Questions
Features
Study Tools

Task 3. Add the user to a secondary groupA couple of months later, this employee's role at the organization has changed, and they are working in both the Research and the Sales departments.In this task, you must add researcher9 to a secondary group (sales_team). Their primary group is still research_team.Use the usermod command with the -a and -G options to add researcher9 to the sales_team group as a secondary group.Note: Options for Linux commands are case-sensitive, so make sure you use a lowercase -a and an uppercase -G.Click Check my progress to verify that you have completed this task correctly.

Question

Task 3. Add the user to a secondary groupA couple of months later, this employee's role at the organization has changed, and they are working in both the Research and the Sales departments.In this task, you must add researcher9 to a secondary group (sales_team). Their primary group is still research_team.Use the usermod command with the -a and -G options to add researcher9 to the sales_team group as a secondary group.Note: Options for Linux commands are case-sensitive, so make sure you use a lowercase -a and an uppercase -G.Click Check my progress to verify that you have completed this task correctly.

...expand
🧐 Not the exact question you are looking for?Go ask a question

Solution

To add a user to a secondary group in Linux, you can use the usermod command. Here are the steps:

  1. Open a terminal window. This can usually be done by searching for "terminal" in your computer's search bar or menu.

  2. Type the following command to add the user 'researcher9' to the 'sales_team' group:

sudo usermod -a -G sales_team researcher9
  1. Press Enter.

Here's what this command does:

  • sudo: This runs the following command as the superuser, which is necessary for modifying user groups.
  • usermod: This is the command to modify a user.
  • -a: This option tells usermod to add the user to the specified group(s).
  • -G: This option is followed by the group(s) you want to add the user to.
  • sales_team: This is the group you're adding the user to.
  • researcher9: This is the user you're adding to the group.

After running this command, 'researcher9' will be a member of both the 'research_team' and 'sales_team' groups. The 'research_team' group is their primary group, and 'sales_team' is a secondary group.

  1. To verify that 'researcher9' has been added to the 'sales_team' group, you can use the groups command:
groups researcher9

This will list all the groups that 'researcher9' is a member of. If 'sales_team' is listed, then you've successfully added 'researcher9' to the 'sales_team' group.

This problem has been solved

Similar Questions

A new employee has joined the Research department. In this task, you must add them to the system. The username assigned to them is researcher9.Write a command to add a user called researcher9 to the system.Next, you need to add the new user to the research_team group.Use the usermod command and -g option to add researcher9 to the research_team group as their primary group.

The new employee, researcher9, will take responsibility for project_r. In this task, you must make them the owner of the project_r.txt file.The project_r.txt file is located in the /home/researcher2/projects directory, and owned by the researcher2 user.Use the chown command to make researcher9 the owner of /home/researcher2/projects/project_r.txt.Click Check my progress to verify that you have completed this task correctly.

Which of the following options can be used with the usermod command to add a user to a supplementary group?Select one:a.-Ub.-Lc.-ad.-N

Task 4. Delete a userA year later, researcher9, decided to leave the company. In this task, you must remove them from the system.Run a command to delete researcher9 from the system:This command will output the following message:This is expected.Note: When you create a new user in Linux, a group with the same name as the user is automatically created and the user is the only member of that group. After removing users, it is good practice to clean up any such empty groups that may remain behind.Run the following command to delete the researcher9 group that is no longer required:Click Check my progress to verify that you have completed this task correctly.Delete a user

Your organization uses a Linux-based network. The legal department has a user group called legal, and this group has access to all the directories that legal employees need. A new legal employee, John J. Smith, just started, and his username is jjsmith. Which command can you use to grant John access to the same directories as all other legal employees?

1/1

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.