Tuesday, December 9, 2014

Practice test!

EDIT: I MADE SUBSTANTIAL CHANGES TO THIS EXAM.

I created a practice test for LFCS that I think is serious overkill. I tried to create questions that hit on every core competency listed on linuxfoundation.org's website. Assume you have a CentOS 6.5 box with primary drive of 20gb and two supplemental drives of 5gb each.
 
  1. You do not know the root password. Interrupt the startup and reset the root password to “centos”
  2. Upon reboot, manually configure grub to boot into runlevel 3
  3. Upon booting, set the machine to permanently boot into runlevel 3
  4. Change the hostname to CENT6
  5. Statically assign viable network settings for your machine:
    1. IP - DNS - FQDN - Gateway
  6. Install the Apache Package
    1. Change the default directory to /web/html
    2. Create a file named index.html and place it in /web/html
    3. Make sure that anyone on your local subnet can access index.html but no one else.
  7. Create the following users with the following details - If the supplemental groups listed do not exist, create them.
    1. Bob - Supplemental Group Engineering - PW: cent6
    2. Tim - Supplemental Group WebDev - PW: cent6
    3. Ben - Supplemental Group Chemical - PW: cent6
    4. All accounts created must expire one year from today.
    5. Set Bob's default shell to zsh
    6. Set Tim's default home directory to /websites - if this directory does not exist, create it.
      1. Apply the same SELinux contexts and permissions to /websites that would be found on a user's /home directory such that Tim and only Tim will have access to /websites
  8. Give Ben complete Sudo access to the machine.
  9. Give Tim Sudo access to the following tool:
    1. iptables
  10. Create a directory named /Homework
    1. Allow all users to read this directory. But nothing else.
    2. Create three folders inside /Homework
      1. Bob_homework
      2. Tim_homework
      3. Ben_homework
    3. Give Bob (and only Bob) read and write access to /Homework/Bob_homework
    4. Give Tim (and only Tim) read and write access to /Homework/Tim_homework
    5. Give Ben (and only Ben) read and write access to /Homework/Ben_homework
  11. Create a RAID 0 array using the two spare drives on (5GB) on this machine.
    1. Size=2048MB
    2. Label=RAID_0
    3. Mount it persistently by Label at /storage
  12. Create a RAID 1 array using LVM using the two spare drives (5GB) on this machine
    1. size 1024MB
    2. Label=RAID_1
    3. Mount it persistently by UUID at /storage2
  13. Using the left over space on those one of those two drives, create a 1GB SWAP partition and add it to the existing SWAP pool - This SWAP space should mount at boot.
  14. Assume that there is an NFS share somewhere on your network. Write the command you would use to mount the NFS share on /NFS_mount. Append your terminal code to a file named “network_mount.txt” and place it in the /root folder.
    1. The IP or DNS name for the share do not matter - Use whatever you would like.
  15. Assume that there is an CIFS share somewhere on your network. Write the command you would use to mount the CIFS share on /CIFS_mount. Append your terminal code to a file named “network_mount.txt” and place it in the /root folder.
    1. The IP or DNS name for the share do not matter - Use whatever you would like.
  16. Create a bash script named “Infinite_loop” that does the following:
    1. Continually writes the string "Linux is fun" to the folder /dev/null
    2. Has no exit loop (that is, it will continue to run until told to stop
    3. Place the script in /root
    4. Give bob permissions to run infinite_loop
    5. Switch user to Bob and have him run infinite_loop
    6. Switch back to root
    7. As root, locate the now running infinite_loop and forcefully kill it by PID
  17. Create a backup of the /etc/yum.repos.d folder using tar or rsync; place your backup in /root
  18. Create a local repo using a live dvd iso of Centos
  19. Using your local repo, install the appropriate packages needed for virtualization.
  20. Download the following text file from Project Gutenberg
    1. Within that document, find and replace every instance of the word "Ernest" with "Earnest"
    2. Find line 3123 and put it at the bottom of the document.
    3. Find line 2134 and put it at the top of the document.
    4. Find line 2351 and put it at line 1532.

 
Post your solutions below if you want (if anyone is reading).  

10 comments:

  1. Hi Brandan, how did you do on your LFCS test? I'm trying to prepare fro the same test in the future.

    ReplyDelete
    Replies
    1. I failed the first time due to a technical error on my part but I passed the second time with flying colors - The only thing I will tell you is that any change that you make to a system that could result in a KP or Emergency Mode will immediately end your exam. When I appealed to the Linux Foundation over my first failure, they informed me that "you should be taking the test as if you are working in a COLO with no physical access to the machine; ssh only" so yeah - If you make changes to something that could break the connection (fstab or sudoers etc...) make sure you know what you are doing...

      Other than that, I will say that if you can do RHCSA, LFCS is on the same level. Just prepare by doing everything you can in terminal (no GUI) and follow certdepot.net - That site was insanely valuable.

      Delete
  2. Hello Brendan. Could you please provide some inside information about the LFSC exam. I will be taking it in about 2 weeks and want to be fully prepared.

    ReplyDelete
  3. Great job posting these Practice Test questions, Brendan. They are of the same nature with the LFCS exam questions. If somebody answers all of the questions above, he/she should have no problem passing LFCS exam.

    ReplyDelete
  4. Thank you very much for the Practice Test.
    I give the exam in 3 weeks!
    I have i question. What do you min in 6 question in 3 part??
    To give access only in local subnet? How to do what???
    Thank you in advance.

    ReplyDelete
  5. Thanks man...appreciate the time you took to make this.

    ReplyDelete
  6. How can you reset root password without rebooting and effectively breaking the ssh connection and as a result fail the test?

    ReplyDelete
  7. are there any solutions for this

    ReplyDelete
  8. Hello Brendan. Could you please help me to provide some inside information about the LFSC exam. I will be taking it in about 2 weeks and want to be fully prepared as I have to give exam in our office premises

    ReplyDelete
  9. Passing the LFCS exam is not a big deal now! You can get most reliable LFCS study material from dumpsdownlaod at very reasonable price. Our study material covers all the pionts of LFCS exam. For more information visit us. Dumpsdownload.com

    ReplyDelete