Create a Group KodeKloud Engineer Task Success

Ticker

6/recent/ticker-posts

Create a Group KodeKloud Engineer Task Success

Question :  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 mohammed to nautilus_admin_users in all App servers.

 


Please Note :-  Perform the below commands based on your question  server,  user name & other details might differ . So please read task carefully before executing. All the Best 👍

Solution:  

1. Login on  all App server  

thor@jump_host /$ ssh tony@stapp01

The authenticity of host 'stapp01 (172.16.238.10)' can't be established.

ECDSA key fingerprint is SHA256:RIRt2SqEVQ3yKDQ+cX5QLPw7mJNJhXUcT5Dpsy4GU1U.

ECDSA key fingerprint is MD5:bd:f7:14:9e:c0:fd:41:0d:2d:e4:30:47:8a:34:35:ae.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'stapp01,172.16.238.10' (ECDSA) to the list of known hosts.

tony@stapp01's password:

[tony@stapp01 ~]$ sudo su -

 We trust you have received the usual lecture from the local System

Administrator. It usually boils down to these three things:

     #1) Respect the privacy of others.

    #2) Think before you type.

    #3) With great power comes great responsibility.

 [sudo] password for tony:

[root@stapp01 ~]#

3. Create Group named given in your task by below command    

[root@stapp01 ~]# groupadd nautilus_admin_users

[root@stapp01 ~]#

4. Check user is already present, if not then create user    

[root@stapp01 ~]# id mohammed

id: mohammed: no such user

[root@stapp01 ~]# cat /etc/passwd |grep mohammed

[root@stapp01 ~]#


5. Now create a user  adding in to newly created group

[root@stapp01 ~]# useradd -G nautilus_admin_users mohammed

[root@stapp01 ~]#


6.  Validate the task by below commands     

[root@stapp01 ~]# id mohammed

uid=1002(mohammed) gid=1003(mohammed) groups=1003(mohammed),1002(nautilus_admin_users)

[root@stapp01 ~]#

[root@stapp01 ~]# cat /etc/passwd |grep mohammed

mohammed:x:1002:1003::/home/mohammed:/bin/bash

[root@stapp01 ~]#



Please Note :- I have showed only for stapp01
You have to do this in all app server stapp01,stapp02, stapp03. 


7. Click on Finish & Confirm to complete the task successful

Happy Learning!!!!


Apart from this if you need more clarity,  I have made a  tutorial video on this , 

please go through and share your comments. Like and share the knowledge















Post a Comment

0 Comments

Latest Posts

KodeKloud Kubernetes Security CKS  Lab Challenge 4 |  Audit-policy | Install & configure falco utility | Inspect the API server audit logs and identify the user