Question : The system admins team of xFusionCorp Industries has set up a new tool on all app servers, as they have a requirement to create a service user account that will be used by that tool. They are finished with all apps except for App Server 1 in Stratos Datacenter.
Create a user named javed in App Server 1 without a home directory
1. At first login on app server given in task & Switch to root user
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. Check user javed is existed , if not then proceed with creation
[root@stapp01 ~]# id javed id: mohammed: no such user [root@stapp01 ~]# cat /etc/passwd |grep javed [root@stapp01 ~]# |
4. create a user javed with below commands ( check user name in your task)
[root@stapp01
~]# useradd -M javed [root@stapp01
~]# |
[root@stapp01
~]# id javed uid=1002(javed)
gid=1002(javed) groups=1002(javed) [root@stapp01
~]# [root@stapp01
~]# cat /etc/passwd |grep javed javed:x:1002:1002::/home/javed:/bin/bash [root@stapp01
~]# [root@stapp01
~]# ll /home total 8 drwx------ 1
ansible ansible 4096 Oct 15 2019
ansible drwx------ 1
tony tony 4096 Jan 25 2020 tony [root@stapp01
~]# |
6. Click on Finish & Confirm to complete the task successful
Happy Learning!!!!
0 Comments