LPI Linux Certification in a Nutshell - novelonlinefull.com
You’re read light novel LPI Linux Certification in a Nutshell Part 44 online at NovelOnlineFull.com. Please use the follow button to get notification about the latest chapter next time when you visit NovelOnlineFull.com. Use F11 button to read novel in full-screen(PC only). Drop by anytime you want to read free – fast – latest novel. It’s great if you could leave a comment, share your opinion about the new chapters, new novel with others on the internet. We’ll do our best to bring you the finest, latest novel everyday. Enjoy
Administrative Tasks (Topic 107) Review questions 1. What would happen to a user account if the default sh.e.l.l were changed to /bin/false?
2. When a new account is created with useradd -m useradd -m, what files are used to populate the new home directory?
3. Compare and contrast the execution of /etc/profile /etc/profile and and /etc/bashrc /etc/bashrc.
4. Compare and contrast cron cron and and at at.
5. Is there a cron cron command? command?
6. Describe the format of a crontab crontab file, describing each of the six fields. file, describing each of the six fields.
7. What does an asterisk mean in crontab crontab fields 1 through 5? fields 1 through 5?
Exercises 1. Add a user with useradd useradd, including a new home directory populated with files from /etc/skel /etc/skel.
2. Add a group with groupadd groupadd.
3. Use usermod usermod to add your new user to the new group. to add your new user to the new group.
4. Set the new user's pa.s.sword using pa.s.swd pa.s.swd.
5. Log into the new account, and use newgrp newgrp to change to the new group. to change to the new group.
6. Delete the new group and user (including home directory) using groupdel groupdel and and userdel userdel.
7. Examine the contents of /etc/skel /etc/skel. How similar are they to your own home directory?
8. Review the contents of /etc/profile /etc/profile and and /etc/bashrc /etc/bashrc.
9. Add an entry in your personal crontab crontab file to perform a task, such as sending you an email message. Confirm that the action occurs as expected. Experiment with the five time specifiers. file to perform a task, such as sending you an email message. Confirm that the action occurs as expected. Experiment with the five time specifiers.
10. Schedule a command in the future with at at. How is at at different from different from cron cron?
Essential System Services (Topic 108) Review Questions 1. Why is accurate time important on a Linux system? What options exist to keep time in sync?
2. Describe the difference between system time and the hardware clock.
3. How is time stored on a Linux system? How is the time zone used to modify this value?
4. What two things does the syslogd syslogd server use to categorize log entries? What are the limitations of this format? server use to categorize log entries? What are the limitations of this format?
5. Give some examples of what kinds of messages you would expect to see in /var/log/messages /var/log/messages.
6. What does lpd lpd do to handle incoming print jobs destined for empty print queues? do to handle incoming print jobs destined for empty print queues?
7. Describe the kinds of information included in /etc/printcap /etc/printcap.
8. What is the function of a print filter?
9. What does the -P -P option specify to the print commands? option specify to the print commands?
10. When is it useful to pipe into the standard input of lpr lpr instead of simply using a filename as an argument? instead of simply using a filename as an argument?
11. How is the Ghostscript program used in printing to a non-PostScript printer?
12. What filter is used on a Linux system to print to remote printers on Windows clients?
13. What are the common Mail Transport Agents (MTAs) used on Linux systems? Give a brief description of each.
14. What command would you use to view the contents of the mail queue on a system running sendmail? What command would you use to force a resend of that queue?
15. What is the easiest way to forward all email coming into an account to another email address?
16. What file is used to maintain email aliases for local users? Describe the maintenance procedure for this file.
Exercises 1. Run the date date command on your system. Is your system clock accurate? Run the command command on your system. Is your system clock accurate? Run the command ntpd gnq ntpd gnq. Did you system time change? By how much?
2. Add this line:*.*/var/log/everything to /etc/syslog.conf /etc/syslog.conf and restart and restart syslog syslog. Now run tail f /var/log/everything tail f /var/log/everything. What kinds of things do you see? How often are events written to this log?
3. Add the local5 local5 facility to your configuration. Use facility to your configuration. Use logger logger to write to your new logfile, and verify its contents. Compare your log entries with those in to write to your new logfile, and verify its contents. Compare your log entries with those in /var/log/messages /var/log/messages.
4. Examine /etc/logrotate.conf /etc/logrotate.conf. What happens after /var/log/messages /var/log/messages is rotated? is rotated?
5. On a system with an existing printer, examine /etc/printcap /etc/printcap. Which print filter is used for the printer? Which queue or queues are directed at the printer?
6. Check the printer status with lpq -P lpq -P printer printer and and lpc status lpc status. Print to the queue using lpr -P lpr -P printer file printer file.
7. Examine /var/spool/lpd /var/spool/lpd for the spool directory of your print queue. Examine the files you find there. for the spool directory of your print queue. Examine the files you find there.
8. Determine what MTA is installed on your system. Is it listening on TCP port 25? How can you tell?
9. Type the command telnet localhost 25 telnet localhost 25. What do you see?
10. Type the command echo "test" | mail root echo "test" | mail root. Now type tail /var/log/maillog tail /var/log/maillog. Was your mail delivered? How can you tell?
Networking Fundamentals (Topic 109) Review Questions 1. Describe how the subnet mask affects the maximum number of hosts that can be put on a TCP/IP network.
2. Name the three default address cla.s.ses and the subnet masks a.s.sociated with them.
3. Identify the IPv4 private address ranges.
4. What are some advantages IPv6 has over IPv4?
5. The UDP protocol is said to be connectionless. Describe this concept and its consequences for applications that use UDP.
6. What is a TCP port? Give some examples of common TCP ports and the applications and protocols that use them.
7. What user command is frequently used to send ICMP messages to remote hosts to verify those hosts' connectivity?
8. Describe the contents and use of /etc/hosts /etc/hosts.
9. In what configuration file are DNS servers listed? What is intended if the local loopback address is included there on a workstation?
10. Name two modes of the netstat netstat command and the program's output in each case. command and the program's output in each case.
11. Describe why the route route command is needed for a single interface on a nonrouting workstation. command is needed for a single interface on a nonrouting workstation.
12. How does traceroute traceroute determine the ident.i.ties of intermediate gateways? determine the ident.i.ties of intermediate gateways?
13. Describe the advantages and consequences of implementing DHCP.
Exercises 1. Examine your system's TCP/IP configuration using ifconfig eth0 ifconfig eth0 or a similar command for your network interface. Are you using DHCP? What type of subnet are you running with? Is it a cla.s.s A, B, or C address? Are you using a private address? Experiment with taking the interface offline using or a similar command for your network interface. Are you using DHCP? What type of subnet are you running with? Is it a cla.s.s A, B, or C address? Are you using a private address? Experiment with taking the interface offline using ifconfig eth0 down ifconfig eth0 down and and ifconfig eth0 up ifconfig eth0 up.
2. Examine the contents of /etc/services /etc/services. How many protocols do you recognize?
3. Use the dig dig command to locate information from DNS servers about a domain name. command to locate information from DNS servers about a domain name.
4. Examine your /etc/hosts /etc/hosts file. How much name resolution is accomplished in this file manually? file. How much name resolution is accomplished in this file manually?
5. Examine your /etc/resolv.conf /etc/resolv.conf file. How many DNS servers do you have available? file. How many DNS servers do you have available?
6. Execute netstat -r netstat -r. How many routes are reported? What are the routes to the local network and interface for?
7. Use traceroute traceroute to examine the route to a favorite website. to examine the route to a favorite website.
Security (Topic 110) Review Questions 1. What daemon is a.s.sociated with the control files /etc/hosts.allow /etc/hosts.allow and and /etc/hosts.deny /etc/hosts.deny?
2. In general terms, describe a method to locate SUID programs in the local filesystem. Why might an administrator do this routinely?
3. What is the danger of making /bin/vi /bin/vi SUID? SUID?
4. Why should a user run ssh ssh instead of instead of telnet telnet?
5. Describe shadow pa.s.swords and the file where the pa.s.swords are stored. Why don't we store encrypted pa.s.sword strings in /etc/pa.s.swd /etc/pa.s.swd anymore? anymore?
6. How can the tool /usr/sbin/lsof /usr/sbin/lsof help you identify potential security issues? help you identify potential security issues?
7. What is the difference between a hard limit and a soft limit, with regard to the ulimit ulimit command? command?
8. Why is it advisable to use sudo sudo rather than rather than su su in an environment with multiple administrators? in an environment with multiple administrators?
9. What kinds of things can you ascertain about a remote system with the nmap nmap command? command?
10. Describe the process of key-based authentication between systems using ssh ssh.
11. What is the difference between a public and a private key? What are they used for?
12. Describe how to encrypt a file with gpg gpg.
Exercises 1. Use find find as described in as described in Chapter22 Chapter22 to locate SUID files. Is the list larger than you expected? Are the entries on your list justifiably SUID programs? to locate SUID files. Is the list larger than you expected? Are the entries on your list justifiably SUID programs?
2. Create an entry in /etc/sudoers /etc/sudoers that lets your user account run any command as root. Run some commands through that lets your user account run any command as root. Run some commands through sudo sudo and watch the file and watch the file /var/log/messages /var/log/messages. What entries do you see? How would this be useful in a multiadministrator environment?
3. Look at the file /etc/shadow /etc/shadow. What user accounts do not have pa.s.swords? Why don't they?
4. Experiment with the chage chage command to set the pa.s.sword age for your account. command to set the pa.s.sword age for your account.
5. Run ulimit a ulimit a. What default limits are set? What would be some useful limits to place on users?
6. Run netstat --tcp anp | grep LISTEN netstat --tcp anp | grep LISTEN. What processes on your system are listening on TCP ports? If you were to harden this system, how would you change this configuration?
7. Run nmap localhost nmap localhost. Does this output match what you saw from the previous netstat netstat command? Why or why not? command? Why or why not?
8. If you have xinetd xinetd installed, go to the installed, go to the /etc/xinetd.d /etc/xinetd.d directory and determine what services are enabled. directory and determine what services are enabled.
9. Run ssh-keygen t dsa ssh-keygen t dsa. What files were created in ~/.ssh ~/.ssh? What are the permissions on those files?
On the ExamPractice, practice, practice! The best way to get familiar with Linux is by interacting with a working Linux system. Become familiar with the command line and how to read logfiles. Nothing is hidden from you in Linux; if you know where to look, simple tools such as cat cat, ls ls, and grep grep will tell you everything you need to know about your system. Spend as much time as you can working hands-on with a Linux system before you take the LPI 102 exam. will tell you everything you need to know about your system. Spend as much time as you can working hands-on with a Linux system before you take the LPI 102 exam.
Chapter26.Exam 102 Practice Test
This chapter will give you an idea of what kinds of questions you can expect to see on the LPI 102 test. All questions are either multiple-choice single answer, multiple-choice multiple answer, or fill in the blank.
The questions are not designed to trick you; they are designed to test your knowledge of the Linux operating system.
As of April 1, 2009, all exam weights for LPI exams have been standardized to 60 weights.
Regardless of weight totals, each exam score is between 200 and 800. A pa.s.sing score is 500. However, the number of correct questions required to achieve a score of 500 varies with the overall difficulty of the specific exam that is taken.
The number of questions on the exam is also tied to the total of the weights of the Objectives on the exam. With a total weight count of 60, the exam will have 60 questions. For each weighting, there will be one question. For example, if an Objective has a weight of 4, there will be 4 questions on the exam related to the objective.
The answers for these sample questions are at the end of this chapter.