TechHui

Hawaiʻi's Technology Community

I applied for a Linux administrator position.

Here are the questions asked with my answers. Let me know if  you think I was correct.

Questionnaire - Senior Linux Administrator

1) How could you get root access to a Linux machine whose root password has been lost?

    Boot to single user mode, then use passwd to set the root password.

2) Write a shell command that can find all files within the /www/sites/
   directory tree that were modified more than 10 days ago, excluding any
   files with .jpg, .gif, .mov, and .avi extensions. Make the output list
   the path and size of said file(s).

    find /www/sites -mtime 10 ! -name '*.avi' ! -name '*.gif' ! -name -o -name '*.mov' ! -name '*.jpg'  -ls

3) What's your favorite scripting language? Why?

    Bash, because its usually available on almost every distribution.

4) Algae is growing on a pond, and the algae is doubling in area every
   day. The pond is exactly covered at midnight on the 48th day. When was
   the pond 1/4 covered with algae?

    On the 46th day.

5) What's the difference between RAID 1 and RAID 0? What is RAID 5? What
   is RAID 10? Rank the following in terms of raw data transfer rate: IDE,
   SATA 1, Ultra320 SCSI, and SAS.

    Raid 1 = Striped, No Mirror, No Parity
    Raid 0 = Mirrored, No Stripe, No Parity
    From slowest to fastest: IDE, SATA 1, Ultra320 SCSI, and SAS.

6) How would you troubleshoot a Postfix mail server that had 100,000 messages built up in its mail queue?
    a) stop the server
    b) check the logs, find out why the messages are held or deferred
    c) check the queue, find the account that is generating all this bad mail and disable whatever the cause.
    d) Restart the server.
    e) Inform the user of the account and work with him, her or it to resolve the issue
    

7) A client is running JBoss on TCP port 8080 on a server, and they need
   it to be accessible from the outside world on TCP port 80. How could you
   achieve this? (Also, why wouldn't they just run JBoss on port 80 in the
   first place?)  To get Jboss accessible on port 80, you could run a load
   balancer or use tomcat to redirect traffic from port 80 to 8080.

    We don't want web applications running in privileged mode, they'll have
    to much access to the server and the bad guys can break things through
    them. Privileged mode is required to access port 80 and other ports
    below 1024.

8) Villains have deleted all of the data in a replicated MySQL installation that you operate! The last full backup is 24 hours old. How could you restore the database to the state that it was at immediately before the data was deleted?
    A)Locate the last known good backup.
    b)Clear the data node file systems  
    c)Drop mysql.ndb_binlog_index
    d)execute ndb_restore –restore_epoch
    e)Restore the ndb_binlog_index table from the output of mysqldump
     f) find the epoch applied most recently
        SELECT @LAST_EPOCH:=MAX(epoch)FROM mysql.ndb_apply_status;
    e)Find the latest binary log file and position within this file that
      correspond to the last epoch in the ndb_binlog_index table:
        SELECT Position, @FIRST_FILE:=File
                FROM mysql.ndb_binlog_index
                WHERE epoch > @LAST_EPOCH ORDER BY epoch ASC LIMIT 1;
    f)Using mysqlbinlog, replay the binary log events from the given file
      and position up to the point of the failure

9) How would you troubleshoot a MySQL server that was experiencing unusually high CPU load?
    a) Ensure persistent connections are off
    b) Ensure no one can log in remotely to MySQL
    c) Turn on MySQL slow query Log
    d) run “SHOW PROCESSLIST;”
    e) Ensure the buffer sizes are sufficient to the task at hand
    f) Run a MySQL profiler
 
10) Is it more important to give a customer what they want, or what they need? Explain.
    It is important to understand what the customer wants. What is his/her
    underlying purpose. Then find a way to meet that purpose with what you
    have and with in the confines of their service level agreement.
 

11) What does "This function uses O(e^n) time" mean?

    The time it takes to complete grows exponentially as the size of its input grows linearly.

Views: 47

Sponsors

web design, web development, localization

© 2024   Created by Daniel Leuck.   Powered by

Badges  |  Report an Issue  |  Terms of Service