Question : There are new requirements to automate a backup process that was performed manually by the xFusionCorp Industries system admins team earlier. To automate this task, the team has developed a new bash script xfusioncorp.sh. They have already copied the script on all required servers, however they did not make it executable on one the app server i.e App Server 1 in Stratos Datacenter.
Please give executable permissions to /tmp/xfusioncorp.sh script on App Server 1. Also make sure every user can execute it.
1. Login on App server as per the task
Server Name | IP | Hostname | User | Password | Purpose |
stapp01 | 172.16.238.10 | stapp01.stratos.xfusioncorp.com | tony | Ir0nM@n | App 1 |
stapp02 | 172.16.238.11 | stapp02.stratos.xfusioncorp.com | steve | Am3ric@ | App 2 |
stapp03 | 172.16.238.12 | stapp03.stratos.xfusioncorp.com | banner | BigGr33n | App 3 |
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 ~]# |
2. List the file existing file permission
[root@stapp01 ~]# ls -ltr /tmp/xfusioncorp.sh ---------- 1 root root 40 Jun 17 09:02 /tmp/xfusioncorp.sh [root@stapp01 ~]# |
3. As per the task all other users need to have execute permission
[root@stapp01 ~]# chmod o+rx /tmp/xfusioncorp.sh [root@stapp01 ~]# |
[root@stapp01 ~]# cat /tmp/xfusioncorp.sh #!/bin/bash echo
"Welcome To KodeKloud" [root@stapp01 ~]# |
4. Verify the file permissions and execute the script form user
[root@stapp01 ~]#ls -lrt /tmp/xfusioncorp.sh -------r-x 1 root root 40 Jun 17 09:25 /tmp/xfusioncorp.sh [root@stapp01 ~]# exit logout [tony@stapp01 ~]$ sh /tmp/xfusioncorp.sh Welcome To KodeKloud [tony@stapp01 ~]$ |
5. Click on Finish & Confirm to complete the task successful
Happy Learning!!!!
4 Comments
where can i get app svr username pwd ? I dont see the task
ReplyDeleteyou can get on Wiki page left side menu tab click on link to get all server password https://kodekloudhub.github.io/kodekloud-engineer/docs/projects/nautilus. Feel free to chat online for instant response while doing task
Deletea+rx instead of o+rx , it says all users !! { FREE PALESTINE }
ReplyDeleteThanks for comment. For all users you can used it.
Delete