Skip to main content

Lab 002: Create a Group


Lab 002: Create a Group

Requirements

There are specific access levels for users defined by the xFusionCorp Industries system admin team. Rather than providing access levels to every individual user, the team has decided to create groups with required access levels and add users to that groups as needed. See the following requirements:

a. Create a group named nautilus_admin_users in all App servers in Stratos Datacenter.

b. Add the user jarod to nautilus_admin_users group in all App servers. (create the user if doesn't exist).


Note

This lab focuses on Linux group creation and user group assignment.

Prerequisites

  • SSH access to all app servers with root or sudo privileges.
  • User management tools available (groupadd, useradd, id, grep).

Steps

Login to the app server and switch to root. For the server credentials, check out the Project Nautilus documentation.

sshpass -p '*********' ssh -o StrictHostKeyChecking=no tony@172.16.238.10
sudo su -
*********
[root@stapp01 ~]# id jarod
id: ‘jarod’: no such user
[root@stapp01 ~]# groupadd nautilus_admin_users
[root@stapp01 ~]# grep nautilus /etc/group
nautilus_admin_users:x:1002:
[root@stapp01 ~]# useradd -G nautilus_admin_users jarod

[root@stapp01 ~]# id jarod
uid=1002(jarod) gid=1003(jarod) groups=1003(jarod),1002(nautilus_admin_users)

[root@stapp01 ~]# grep nautilus /etc/group
nautilus_admin_users:x:1002:jarod

Repeat the same steps on App server 2 and 3.


Verification

  • Confirm group exists with grep nautilus_admin_users /etc/groupon all app servers.
  • Confirm user jarod is member of the group with id jarod.
  • Confirm group membership lists jarod in the output.

Resources