I wrote the following test for a Systems Administrator based on tasks I had done or they would be expected to do on a regular basis.

Systems Engineer Test:

You will have two hours to complete the test.  You will need to keep close track of your time. The test will not shut off. The time will be recorded on the site. It is not expected that you will finish everything in that time-frame but please get as far as you can.  You do not have to complete the tasks in order – please feel free to jump around however you would like.

We also ask that you document the process with a set of rough notes.  These notes do not have to be polished.  They should be designed for you (or someone as technical as you) to refer to if you were asked to repeat these steps some period of time later when it was not fresh in your mind.  The notes can be in any format you wish.

We have set up a VM running CentOS 7.2 with the IP Address 198.199.118.51.  The login info is theaccount/theaccount.  This account has sudo rights.

Please do the following tasks:

  • Setup the specified 'theaccount' account to login without passwords
  • Create a new user account 'xyz'
  • Fix the 'abc' user to have a home directory with the correct permissions
  • Install Apache and configure to run on default port 80
  • Verify Apache is working
  • Configure Apache to serve the attached html webpage
  • Automate the system to rotate the Apache logs every 5 minutes
  • Test the performance of the Apache server rendering the test page.  How many simultaneous requests can it handle per minute?
  • Install Nginx and configure to run on port 15080
  • Configure Nginx to serve the attached html webpage
  • Configure the server so that there is only 1 file or folder that serves webpages to both Apache and Nginx.  They are synchronized not copied
  • Test the performance of the Nginx server to render the test page.  How many simultaneous requests can it handle per minute?
  • Compare performance between Nginx and Apache serving the webpage, summarize results
  • Secure the server, allowing incoming traffic only on the ports you have used.
  • Automate the process of performing the Apache or Nginx installation, configuration, securing the server, sharing web content, and producing a report
  • If time allows, do something else to impress…  anything you want to do. Within 2 hours of receiving this message, please reply, attaching a copy of your notes and being clear which parts were done, partially done or not done.

Machine detail setup

  • This machine had the firewall off
  • Deleted the 'abc' account home directory
  • Other than that was baseline install

Top candidates test results

I think this candidate did everything well and was overqualified for the position, but would have hired them if allowed.

pwd
cd /home
ls
exit
ls .ssh
ls -alh
mkdir .ssh
ls -alh
ls -alh .ssh
chmod 700 .ssh
chmod 640 .ssh/authorized_keys
chmod 640 .ssh/authorized_keys2
cat .ssh/authorized_keys
cat .ssh/authorized_keys2
ls -alh
rm .ssh/authorized_keys2
ls
ls -alh
useradd xyz
sudo useradd xyz
ls -alh /home
mkhomedir_helper abc
ls -alh /home
sudo cat /etc/passwd
ls -alh /home
mkdir /home/abc
sudo /home/abc
sudo cp /home/skel/.* /home/abc/
sudo cp /etc/skel/.* /home/abc/
chown -R abc:abc /home/abc
sudo chown -R abc:abc /home/abc
sudo chmod 700 /home/abc
ls -alh /home
ls -alh /home/abc
ls -alh /home/abc/
sudo ls -alh /home/abc/
sudo yum install apache
sudo yum install httpd mod_ssl
service httpd status
sudo /usr/sbin/apachectl start
netstat -an | grep ':80'
netstat -an | grep '80'
sudo netstat -ant
sudo /sbin/chkconfig httpd on
service httpd restart
sudo service httpd restart
netstat -ant
cd /var/www/html
ls
ls -alh
cd /home/theaccount
sudo cp test.html /var/www/html/
sudo ls -alh /var/www/html/
ls -alh /var/www/
ls -alh /var/www/cgi-bin/
cat /etc/logrotate.d/httpd 
sudo crontab -e
cat /etc/crontab
crontab -l
sudo crontab -l
sudo yum install httpd-tools
ab -n 100 -c 10 http://198.199.118.51/test.html
ab -kc 1000 -n 10000 http://198.199.118.51/test.html
sudo yum install nginx
sudo yum install epel-release
sudo yum install nginx
sudo systemctl start nginx
vi /etc/nginx/sites-enabled/default
ls /etc/nginx/conf.d/
cat /etc/nginx/nginx.conf
vi /etc/nginx/nginx.conf
sudo vi /etc/nginx/nginx.conf
sudo systemctl start nginx
grep listen /etc/nginx/nginx.conf
ls /usr/share/nginx/html/
cp test.html /usr/share/nginx/html/
sudo cp test.html /usr/share/nginx/html/
rm /usr/share/nginx/html/test.html 
sudo rm /usr/share/nginx/html/test.html 
sudo ln -s /var/www/html/test.html /usr/share/nginx/html/test.html
ab -kc 1000 -n 10000 http://198.199.118.51:15080/test.html
firewall-cmd --get-default-zone
sudo firewall-cmd --permanent --add-port=22/tcp
sudo firewall-cmd --permanent --add-port=80/tcp
sudo firewall-cmd --permanent --add-port=15080/tcp
sudo systemctl start firewalld
sudo firewall-cmd --permanent --add-port=22/tcp
sudo firewall-cmd --permanent --add-port=80/tcp
sudo firewall-cmd --permanent --add-port=15080/tcp
sudo firewall-cmd --permanent --list-all
sudo firewall-cmd --reload
sudo systemctl enable firewalld
sudo vi automate-apache.sh
chmod a+x automate-apache.sh 
sudo chmod a+x automate-apache.sh 
cat automate-apache.sh 
exit

My report

  • Setup the specified 'theaccount' account to login without passwords: YES
  • Create a new user account 'xyz': YES
  • Fix the 'abc' user to have a home directory with the correct permissions YES
  • Install Apache and configure to run on default port 80: YES
  • Configure Apache to serve the attached html webpage: YES
  • Automate the system to rotate the Apache logs every 5 minutes: Script part to automate is correct, but command fails, looks like permissions and environment.  This wasn’t tested thoroughly
  • Test the performance of the Apache server rendering the test page.  How many simultaneous requests can it handle per minute? YES
  • Install Nginx and configure to run on port 15080: YES
  • Configure Nginx to serve the attached html webpage: YES
  • Configure the server so that there is only 1 file or folder that serves webpages to both Apache and Nginx.  They are synchronized not copied YES
  • Test the performance of the Nginx server to render the test page.  How many simultaneous requests can it handle per minute? YES
  • Compare performance between Nginx and Apache serving the webpage, summarize : YES
  • Secure the server, allowing incoming traffic only on the ports you have used: YES
  • Automate the process of performing the Apache or Nginx installation, configuration, securing the server, sharing web content, and producing a report. Good enough, this is automated however you must run as a sudo account and answer a few prompts.