This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Current Task | |
Given a text file, which will be piped to your command through STDIN, use grep to display all those lines which contain any of the following words in them: | |
the | |
that | |
then | |
those | |
The search should not be sensitive to case. Display only those lines of an input file, which contain the required words. | |
Input Format |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -eu | |
if ! command -v ssh-keygen &> /dev/null ;then | |
echo "Cant seem to find 'ssh-keygen' binary, are you sure its installed ?" | |
exit 1 | |
fi | |
if ! command -v ssh &> /dev/null ;then | |
echo "Cant seem to find 'ssh' binary, are you sure its installed ?" |
The document root /var/www/html of all web apps is on NFS share /data on storage server in Stratos Datacenter. We have a requirement where we want to password protect a directory in the Apache web server document root. We want to password protect http://:<apache_port>/protected URL as per the following requirements (you can use any website-url for it like local host since there are no specific requirements as of now):
b. We do not want to use htpasswd file base authentication. Instead, we want to use PAM authentication, i.e. Basic Auth + PAM so that we can authenticate with a Linux user.
Click on Black Tick to Do Task Again
To secure our Nautilus infrastructure in Stratos Datacenter we have decided to install and configure firewalld on all app servers. We have Apache and Nginx services running on these apps. Nginx is running as a reverse proxy server for Apache. We might have more robust firewall settings in the future, but for now we have decided to go with the given requirements listed below:
- Allow all incoming connections on Nginx port.
- Allow incoming connections from LB host only on Apache port and block for all others.
- All rules must be permanent.
- Zone should be public.
- If Apache or Nginx services aren't running already, please make sure to start them.
The Nautilus production support team was trying to fix issues with their storage server. The storage server has a shared directory /webdata, which is mounted on all app servers at location /var/www/html so that whatever data they store on storage server under /webdata can be shared among all app servers. Somehow NFS server is broken and having some issues. Identify the root cause of the issue and fix it to make sure sharing works fine among all app servers and storage server.
ssh tony@stapp01
The system admins team of xFusionCorp Industries has noticed intermittent issues with DNS resolution in several apps . App Server 1 in Stratos Datacenter is having some DNS resolution issues, so we want to add some additional DNS nameservers on this server. As a temporary fix we have decided to go with Google public DNS (ipv4). Please make appropriate changes on this server.
ssh tony@stapp01 #App Server 1 Ir0nM@n
### OR
ssh steve@stapp02 #App Server 2 Am3ric@
During a routine security audit, the team identified an issue on the Nautilus App Server. Some malicious content was identified within the website code. After digging into the issue they found that there might be more infected files. Before doing a cleanup they would like to find all similar files and copy them to a safe location for further investigation. Accomplish the task as per the following requirements:
- On App Server 3 at location /var/www/html/blog find out all files (not directories) having .js extension.
- Copy all those files along with their parent directory structure to location /blog on same server.
- Please make sure not to copy the entire /var/www/html/blog directory content.
ssh tony@stapp01 # App server 1
ssh steve@stapp02 # App server 2
The system admins team of xFusionCorp Industries needs to deploy a new application on App Server 1 in Stratos Datacenter. They have some pre-requites to get ready that server for application deployment. Prepare the server as per requirements shared below: Install and configure nginx on App Server 1. On App Server 1 there is a self signed SSL certificate and key present at location /tmp/nautilus.crt and /tmp/nautilus.key. Move them to some appropriate location and deploy the same in Nginx. Create an index.html file with content Welcome! under Nginx document root. For final testing try to access the App Server 1 link (either hostname or IP) from jump host using curl command. For example curl -Ik https:// /.
ssh tony@stapp01
sudo yum install epel-release -y
NewerOlder