Test To Give When Hiring or Interviewing a Junior Linux System Administrator

G

gcawood

Guest
Hiring a junior Linux System Administrator can be a challenging task, especially if you are interviewing for someone who is above your own Linux skill set! How do you know for sure that they are going to be any good at what they say they can do? What are the best interview questions to ask a junior Linux System Admin?

In our experience, the best way to gauge an employees skill set is to put them in front of a command line interface and have them execute a number of straightforward tasks. Oftentimes, candidates will say that they have strong skills in Linux, but when confronted with an actual problem, they don't have the "tools" to fix it themselves. So, what we look for is a candidate's ability to use tools, rather than their ability to fix a particular problem.

Employers are typically looking for candidates with the following skill set.

Code:
[B]Typical Job Description: for a hosting company[/B]
    Providing technical support for Level I-II issues via helpdesk and the telephone.
    Monitoring servers for stability and taking both proactive and reactive measures to correct and prevent issues.
    Providing fellow system administrators and support representatives with technical support and guidance.
    Assisting clients in transferring accounts to our servers.
    Installing, configuring, and maintaining services such as Apache, MySQL, and Postfix across multiple servers.

[B]Typical Employer Expectations for Skill Set[/B]
    Strong written and verbal communication skills
    Ability to work well with a team in a fast paced, constantly changed environment
    Ability to follow instructions from supervisors and senior colleagues.
    Outstanding customer service skills and a dedication to the customer service experience.
    Dependable to be at work during assigned shifts and to complete work as expected.
    Available to work emergency services 24/7 if required.
    Advanced knowledge of cPanel/WHM control panel.
    Advanced knowledge of the Linux operating system.
    Knowledge of bash and Perl shell scripting.
    Advanced knowledge of in Exim/Postfix/SendMail etc..
    Advanced knowledge of Apache.
    General Understanding of PHP, MySQL and HTML.


The Test

We use some of the following questions as part of our interview process. These questions are designed to see if a person possess a baseline knowledge of Linux command line utilities. We do NOT require that a candidate do these from memory. We allow candidates to use whatever online resources or MAN pages that they want. We feel that the point of the test is to get every answer right. The point of the test is for a candidate to demonstrate their understanding of the CLI tools required to do them efficiently.

Code:
1) What is the 1st line of a perl script?

2) What is the 1st line of a bash script?

3) What is the command that finds the location of an executable within your path on a server (ie. perl or grep)

4) How do you enable php4 for a directory within a site that requires php5 for all other directories - on a cPanel server?

5) How do you determine the hardware of a running system?

6) Update the locate database

7) Exclude /home/sites from the locate database

8) Find all of the processes started by a particular user and kill them in a one liner.

9) List all of the open files in use by root

10) Display a list of files that are in a particular directory which are owned by USER and have the permissions of “–rw --- ---“

11) Where does cPanel log httpd/apache/mysql errors?

12) Setup a key from from Server A to Server B.

13) Use chkconfig to stop a service from starting (or equivalent command/technique for other distributions)

14) On the test server, (as a bash one liner)
     a) Schedule the following task to run hourly 
     b) List all users IP’s that experienced a fav icon not found error, 
     c) Sort the data by IP Address, 
     d) Count the number of time each IP was affected, 
     e) Put that report into a file
     f) & email the report to [email protected].  

15) rsync the following directory _____ to the following directory______. (excluding all .tar files)

16) using netstat, report back how many tcp connections are in `LISTEN` state

17) dig the mx records of LinuxForum.com

18) List the iptables rules w/ line numbers

19) Drop line 10 of an iptables rule

20) Blacklist an IP

21) Change DNS locally on the server to use Google's 8.8.8.8 server

22) Schedule the server to restart at 2am by command line

23) Determine if a service is running

24) Stop a service

25) Add a database for a new website

26) Create a one-liner that does the following task.  
     A) Generate a report of all IP addresses that appear in access log file from today.  
     B) Count the number of times an IP appears in the report.  
     C) Determine what is the 5th most active IP address, 
     D) Return the second set of 3 digits.  ie. ***.168.***.***
 


Wow, very nice topic. Mind if I pinch your application form? Some good questions as well.

Did you write this yourself?
 
Go ahead and use it - that's why we posted it..

Good stuff, thanks. I'm loving this forum, seems to be nothing but quality so far. I might actually stick around here, there are a lot of webmaster forums, but most of them I've come across just seem to be full of people who are too darn arrogant.
 
-> Rob... now you will have to actually take the test. HA!
 
Some suggestions....

These questions seem to correspond with particular distro's of Linux. Most notably; RedHat or one of its many child projects (Fedora, CentOS, Scientific, etc). The locate and chkconfig commands are prime examples. It may be prudent to specify which distro of Linux you are needing the Linux admin to be most familiar with. I would expect any Linux admin I hire to have a diversity of experience with multiple distributions. However, if your business runs RedHat, don't think a person with only SUSE exposure can hit the floor running.

Some questions/scenarios I present to potential new hires (most likely for level 2+ Linux admins):

Configure two Ethernet devices into a single bonded interface that uses mode 6.

You are given a new server to build. This server has two 146GB, three 300GB and three 600GB drives connected to a hardware RAID controller. How would you configure those drives for maximum storage and redundancy?

Mount an ISO file from within the OS.

List the steps to find the WWPN's on RAID controllers 0 and 3.

You have been presented with three LUN's, each LUN has four paths to the host OS. List the steps you would take to utilize all four paths in a HA scenario.

For RPM-based distro's: Create a simple RPM package to add these kernel parameters <whatever_param=0000> to sysctl.conf.
 
Grimlock: Welcome to LinuxForum - great additions!

Yes, we do use mostly Red Hat / CentOS - but also have a lot of customers running Debian.
 
Can I be pedantic and say the answers to 1 and 2 are what ever you'd like the lines to be if you run them as
Code:
perl file.pl
 
Jeez, haven't written any Perl since college. Better not hire me! :cool:
 
Harder test

Grimlok I found your questions much harder than the ones in the article. I also noticed that the article was aimed at a RedHat based distribution. Thanks
 
I've been a Linux admin for close to six years or so, and I'd probably fail most of these tests; either because I work with different distributions, work with different kinds of workloads, or just haven't had to do most of these things often enough to commit the process to memory. At my employer, we use Linux for database servers, web applications, kiosks, network booting, and basic file services; we run Debian, Ubuntu Server, and some SLES. Your test touched on little to nothing that I do on a daily basis.

IMO a good test would:

- Stick to distro-agnostic commands and ideas

- Not require knowledge of a certain command if there are potential alternatives

- Not require the testee to remember obscure switches (that's what "man" is for).

- Check for knowledge with a variety of workloads, and only then for the most basic familiarity.

Honestly, how hard do you want to make it for someone to work for you?
 
lykwydchykyn good point about man. I actually didn't have much trouble with the article's test but I in general don't remember all the switches etc. When I am coding in C for example I often have to refer to the web for specific arguments and order of args -- and I have been coding in C for over 20 years. The important thing is being able to find the information one needs. I would give any applicant high marks for using the man pages or the Internet when answering questions.
 
Thanks for the great feedback everyone. It's important to remember that this test is designed to be taken by someone who has access to both MAN pages and to Google. This should help the interview candidate not get stumped on syntax or switches. Also, there are only one or two commands that specifically reference Red Hat. If the candidate were to be a Debian buff or show preference to another distro, then I would agree that question #13 should be reworded.

Remember, the premise of this test isn't to score the candidate on a pass/fail. It is to watch them use the tools that they have learned over the years to attempt to answer the questions that are in front of them. It also should help you uncover where their strengths or weakness are.

If you have other good questions that you think should be asked, please post them and I will happily update the test.

Thanks, and keep the feedback coming.
 

1) #!/usr/bin/perl Location of perl interpreter.

2) #!/bin/bash Location of bash interpreter.

3) whereis

4) Create a.htaccess file in the directory with the following line:AddHandler application/x-httpd-php4 .php .php4 .php3

5) lspci

6) updatedb

7) updatedb -e /home/sites

8) ps -ef | grep httpd | awk {'print $2'} | xargs kill [-9]

9) lsof -u root

10) find -maxdepth 1 -user USER -perm 600

11) /usr/local/apache/logs/error_log

12)

13) chkconfig service off

14)

15) rsync -avz --exclude '*.tar' source/ destination NOTE: If you don't want the base directory to be created, leave the trailing / after the source dir.

16) netstat --tcp --listening | grep LISTEN | wc -l

17) dig linuxforum.com mx

18) iptables -L --line-numbers

19) iptables -D CHAINNAME 10

20) iptables -A INPUT -s IP-ADDRESS -j DROP

21) vi /etc/resolv.conf
delete all entries starting with nameserver
add nameserver 8.8.8.8
:wq!

22) at 02:00
shutdown -r now
^D

23) service servicename status

24) service servicename stop

25)

26)
 

Members online


Latest posts

Top