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.
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
~]# |
[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
~]# |
7. Click on Finish & Confirm to complete the task successful
Happy Learning!!!!
0 Comments