-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Systems Administrator Test -=-=-=-=-=-=-=-=-=-=-=-=-=-=- ----------------------------------------------------------------------------- Please answer all questions to the best of your ability. If you don't know the answer to a question, state possible options about how you would attempt to obtain the answer. Be as explicit as possible with your answers. You are encouraged to write small scripts in whichever language you feel comfortable where applicable. Please read the test in its entirety before answering any questions. ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- 1. You execute 'ls -l' on a directory. Where you would normally see the owner's name, you see a numeric ID. What circumstances could contribute to this behaviour? ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- 2. You're curious as to the size, number, and type of swap devices on a machine. Where might you find this information? Assume a Linux system. ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- 3. Explain the role of the environment variables TERM, PAGER, VISUAL, and SHLVL. ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- 4. Assuming a Bourne-compatible shell, what would happen if you executed the following commands? The commands are in no particular order. a) cd - b) echo ${DISPLAY:-SHELL} c) ^-t^-r d) ls -l !$ 2>/dev/null >>/tmp/thisfile ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- 5. a) Bill has recently left the company. His sources are kept under the directory /usr/src/bill. Fred is going to take ownership of the project, but wants to allow others to be able to modify the files. How would you change all the files to be owned by 'fred', group 'staff'. Files should have owner, group, world read, owner/group write; directories should have owner, group, world read/traverse, owner write. b) Describe the consequences of adding the following permissions. Assume the permissions are granted one after another. *) All directories get group write. *) All directories have the sticky bit set. c) Alter your answer to part A to reflect the above changes. ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- 6. To what should the root user's umask be set? Why? ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- 7. Under what situation could the following sequence of commands produce the following output? How would you confirm the cause? chainsaw% cd /tmp chainsaw% ls -lh thisfile -rw-r--r-- 1 root root 4.0M 2008-01-15 19:26 thisfile chainsaw% cp thisfile thatfile sh: cp: no space left on device chainsaw% df -h /tmp Filesystem Size Used Avail Use% Mounted on /dev/sda8 4.0G 281M 3.8G 7% /tmp ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- 8. You find a script that has been misbehaving and not cleaning up its temporary files. In the directory in which these temporary files are written, you see over a million distinct files. Attempting to delete them results in this: chainsaw% rm .ws* rm: argument list too long The directory in question also contains several subdirectories which contain important data, as well as files that are not of a temporary nature. How would you solve this problem and delete only the temporary files without removing the upper-level directory, or any files in any subdirectories beneath? ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- 9. What are the RAID levels natively supported by the Linux kernel, and what is the command and syntax to create 4-disk RAID 5 array? Assume 2.6 series. ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- 10. You have two options for purchasing a quad-port gigabit ethernet controller: a PCI-X adapter or a PCI Express x2 adapter; all other features remain identical. The target machine has both PCI-X and PCI Express slots available. Which do you choose, and why? ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- 11. Under what situation would you choose the following types of hard disks? Which brand of hard disk is your favorite, and why? a) SATA b) SAS c) IDE/ATA d) SCSI e) Fibre Channel ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- 12. A user attempts to log in to their GNOME desktop, but the login process stops halfway through and the user is sent back to the GDM login screen. a) Where would you begin to look for the cause of this issue? b) Without root access, how would you get in and solve this problem? ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- 13. To reduce the number of moving parts in a system, you decide to boot a machine from flash memory instead of a traditional disk. a) Which filesystems would you have to dynamically create on a RAM disk to avoid flash fatigue? b) What other caveats exist on a machine booting from flash in this manner? c) What would you do differently? ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- 14. Explain the modfications necessary to /etc/syslog.conf to cause syslogd to log all messages to a remote syslog server as well as the local system logs. ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- 15. You forgot the root password to a system that's been running for several years. After an accident at the foosball table renders the server without power, you need to log in to restart some services that weren't started on a reboot. Explain how you would go about solving this problem and recovering the root password. Assume a Red Hat-compatible Linux. ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- 16. Explain the benefits of a system with multiple partitions for the various standard top-level directories. Which filesystem do you like best, and why? a) Which of these top-level directories would you normally separate from the root partition? b) Assuming a 36 GB disk, how large would you make each partition? c) What filesystems would you use for each partition? d) What special mount options, if any, would you use, and where? e) Devise a situation where using LVM may be an advantage. f) Devise a situation where using LVM may be a disadvantage. ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- 17. This question expects a string of Vim commands. Use as few as possible to answer each subpart. Type a literal Enter to signify the end of a command which ends with the Enter key. Use ^C, ^H, etc. in place of control characters. Use ^[ (then press enter) to signify the ESC key. In Vim, how would you: a) change the first three words on line 23 to the phrase, 'how now brown cow?' (the linebreak is not part of the phrase) b) change every occurrence of the string, 'let me in', with the string, 'you stay out'. c) Quit without saving changes. d) ... ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- 18. a) To what does the acronym, "IPMI," expand? b) What use is IPMI? c) What common features does IPMI provide? ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- 19. Edit the following BIND 9 zone file to add two hosts, chatchi, with IP address 10.24.16.26, and brainy, with IP address 10.24.16.100. Correct any errors that may be present in the zone. ----------------------------------------------------------------------------- $ORIGIN . $TTL 3600 ex.int IN SOA ns1.ex.int hostmaster.ex.int. ( 2008011400 10800 900 3600 3600 ) NS ns1.ex.int. NS ns2.ex.int. MX 10 mail.ex.int. $ORIGIN ex.int. chainsaw A 10.24.14.200 chainsaw MX 10 mail.ex.int dev CNAME chainsaw hefty A 10.24.14.201 lazy A 10.24.14.214 monster A 10.24.14.227 stupendous A 10.24.14.222 dev A 10.24.14.247 boredom A 10.24.14.261 stupendous A 10.24.14.223 lookout A 10.24.14.227 ----------------------------------------------------------------------------- 20. a) What errors are (or were) present in the above zone file? b) In the Start of Authority section, there are five numbers. What, in the order they are listed, do these numbers mean? c) What additional steps would you perform after editing the forward zone file above? ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- 21. a) What dotted quad netmask does the IP address 10.23.22.240/23 use? b) What would the network address and broadcast address be for the above IP range? How many usable IP addresses are there? c) Can you assign an address to a Linux interface using this VLSM nomenclature? If so, how would you do it? ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- 22. a) What is variable-length subnet masking and why is it important? Hint: it was created to enable CIDR. b) Which RFC 1918 reserved address range should typically be used on a corporate network, and why? c) Why might a corporate network have more than one RFC 1918 range in use? ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- 23. Could the IP address 10.23.23.0 ever be a valid host address? If so, explain a situation where this may be possible. ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- 24. To what does the term, "Wide area network," refer? In what situations might a wide area network be useful? ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- 25. Explain the following Bourne shell code, and why it should NEVER be executed. :(){ :|: & };: ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- XX. What is the ultimate answer to life, the universe, and everything? Who discovered this answer, and how long did it take? ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- 13. ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- If you got here without answering a question, great. From a terminal, execute the command, '/opt/scripts/begin-test.sh'. Save this file when you begin the test, and save it after each subsequent answer to a question. If you go back and edit your answers to a question after you've saved it, that's fine. Just save it again. Send SIGINT to the command when the test is complete. -----------------------------------------------------------------------------