BL Linux - Ch 17 Configuring Print and Email Services

Ace your homework & exams now with Quizwiz!

6.) What are two examples of Mail Transfer Agents that operate as a series of daemons with separated responsibilities? a.) Sendmail b.) Qmail c.) Exim d.) Postfix

b.) Qmail d.) Postfix B and D are correct because both Qmail and Postfix are implemented as a series of separate components so that a problem with one doesn't compromise functionality of the others.

4.) The component of an email system that is responsible for mail delivery from one computer to another is called: a.) Mail User Agent (MUA) b.) Mail Relay Agent (MRA) c.) Mail Transfer Agent (MTA) d.) Mail Deliver Agent (mDA)

c.) Mail Transfer Agent (MTA) C is correct because the MTA's job is to transfer mail from one computer to the next, on its way for delivery.

2.) Which of the following printer stats would indicate that something went wrong with the printer and that some administrative action is necessary? a.) Idle b.) Processing c.) Stopped d.) Paused

c.) Stopped C is correct because the stopped state is reserved for the case when CUPS stops a queue because there is some kind of error.

1.) What is the proper URL to access the CUPs administrative interface running on the same machine as the web browser? a.) http://localhost b.) https://localhost c.) http://localhost:631 d.) http://localhost:389

c.) http://localhost:631 C is correct because the IPP protocol listens on TCP port 631.

2.) Which of the following commands prints a file called resume.pdf to a printer called Main? a.) lpr -d Main resume.pdf b.) lp -P Main resume.pdf c.) lp -d Main resume.pdf d.) lpr resume.pdf

c.) lp -d Main resume.pdf C is correct because the *lp* command's *-d* option selects the destination printer, and the command expects a filename to print.

5.) You configured an alias for your helpdesk, so that [email protected] goes to [email protected], [email protected], and [email protected]. After trying it out, however, the message bounces. What is the likely cause? a.) You didn't restart your MTA b.) You already have a [email protected] user. c.) One of the users has a *.forward* file that is overriding the alias. d.) You didn't run *newaliases*

d.) You didn't run *newaliases* D is correct because the *newaliases* command must be run after editing the alias file.

5.) One of your printers, CentralArea, has a broken paper feeding mechanism and won't be fixed for a few days. Rather than queue jobs until it's fixed, how can you make things so that people trying to print to it let an immediate error, without needing to delete the printer? a.) lpstat --disable -P CentralArea b.) cupsreject -P CentralArea c.) lpadmin -x CentralArea d.) cupsreject CentralArea

d.) cupsreject CentralArea D is correct because the *cupsreject* command rejects all jobs to the given queue immediately.

8.) After adding an email alias to the appropriate file, what command should you run? a.) mailq b.) update-aliases c.) postmap d.) newaliases

d.) newaliases D is correct because the *newaliases* command updates the /etc/aliases.db file with the contents of /etc/aliases.

How do you view the welcome screen for your printer that you can configure?

http://localhost:631

BSD Uniex uses lpr set of tools and SysV uses what?

lp Both are functionally the same and vary in their command line options.

Which command will "query" the print queue for the status of the printer and any jobs?

lpq (shows default)

What provides status information about your printers and jobs? This command will also show you the list of jobs you have queued when it is run with no arguments.

lpstat

How do you view "all" f the print queues and their status?

lpstat -a

3.) How would you determine the default printer that print jobs go to? Type the command and all arguments.

lpstat -d

Which command will show the mail queue?

mailq

Give the full path for the location where the mail logs are stored:

*/var/log/maillog* This is a good place to look for historical accounting of each email.

Where does the command mailq look to find information about the current queue?

*/var/spool/mqueue*

Tell me about the following: *classes.conf*

*classes.conf* Contains the classes, which can also be created in the web interface. A class is a group of printers, and printing to a class queues the job to the first available printer.

What does this command do? *cupsaccept*

*cupsaccept* This reenables the queue assuming it has been disabled by *cupsreject*

What command will allow you to enable a printer when the machines are on two different networks separated by a router (not local)? You have enabled this, but now you need to disable it. What command do you use to disable the remote connection?

*cupsctl --remote-any* This will allow anyone that an connect to the computer to print to it. *cupstl --no-remote-any* This will disable all remote connections.

What command can you use to allow anyone on the network (assumes a trusted network) to delete jobs *even if they don't own them?*

*cupsctl --user-cancel-any* This will allow anyone to cancel jobs regardless of ownership.

What does this command do? *cupsctl*

*cupsctl* It is a tool to manage the configuration of the CUPS daemon. Run it by itself to get a list of the current configuration options.

Tell me about the following: *cupsd.conf*

*cupsd.conf* The main configuration file, which can also be edited in the web interface. This contains default settings such as timeouts, rules about what can be done by different people, and logging settings.

Tell me about the following: *cupsd.conf.default*

*cupsd.conf.default* A default configuration file that you can use if you really break your production cupsd.conf. Editing the configuration file on the Web also gives you an option to revert to the default file.

What does this command do? *cupsdisable*

*cupsdisable* If you need to take down the printer for some maintenance, you can disable printing, while still accepting jobs, with *cupsdisable*. Once you reenable the printer, the jobs begin printing again.

What does this command do? *cupsenable*

*cupsenable* If the printer is in a stopped state because of an error, you can use the *cupsenable* command to reenable it.

What does this command do? *cupsreject*

*cupsreject* This tells the CUPS to reject all jobs sent to the queue

What two command will print anything that is received by them from the input stream or files passed via the command line?

*lp* and *lpr* Example: echo "testing" | lp

What is the difference between *lpq* and *lpstat*?

*lpq* is slightly different from *lpstat* in that *lpstat* without any options shows you all jobs queued by the current user, while *lpq* shows all users

What does this command do? lprm

*lprm* removes jobs from the queue, just like the *rm* command removes file from the filesystem

Which command will update the */etc/aliases.db* database file?

*newaliases* This command must be run as root because the permissions of the files should not allow users to modify it.

Tell me about the following: *ppd*

*ppd* A directory containing the PPD files for each configured printer.

Tell me about the following: *printers.conf*

*printers.conf* Configuration for each printer that you configured on the system.

What does this command do? *lprm -P*

-P designates the printer to cancel the job. Running *lprm* with no job ID removes the top ranked job on the given queue.

7.) You have been asked to send all emails to [email protected] to [email protected] and [email protected]. What's the name of the file that you will be editing? Use the full path to the file.

/etc/aliases

What are the 4 possible states of a printer?

1.) *Idle* = The printer is not printing anything and is awaiting work. 2.) *Processing* = CUPS is currently sending data to the printer. 3.) *Stopped* = An error happened with a print job, so CUPS stopped further printing to the printer. 4.) *Paused* = The administrator has temporarily suspended printing to this printer.

What are the 4 MTAs used by Linux that are relevant to the exam?

1.) Sendmail 2.) Postfix 3.) Qmail 4.) Exim

What does this command do? lpq -P

Allows the user to specify a specific Printer to query

What does this alias do? isaac: [email protected]

Any email destined to isaac's account would be sent back to the MTA to be directed to [email protected]

What is CUPS?

Common Unix Printing System It is built around a daemon that listens for requests both from clients to print and from humans to manage the printers and queues. Data transfer is done through the Internet Printing Protocol, which is built on top of HTTP so the same daemon can do both jobs.

What does this command do? lpstat -d

Displays the name of the default printer

If you want to enable remote administration what command do you need to run? How do you disable it?

Enable remote *cupsctl --remote-admin* Disable remote *cupsctl --no-remote-admin*

Tell me about Exim

Exim is another monolithic MTA, like Sendmail, but has a better security record. Exim is highly configurable without needing to devolve into the madness that is sendmail's M4.

What does this command do? lpstat -r

Indicates whether CUPS is running

What is LPR?

Line Printer Remote This protocol is simple; a conversation between a client and a server involves a quick handshake and the job itself.

What is *MDA*?

Mail Delivery Agent (MDA) Receives email through SMTP like an MTA and deliver it to a local mailbox in whichever format is used at the destination site.

What is the *MTA*?

Mail Transfer Agent (MTA) The MTA's job is to receive an email from a MUA or other MTA and get it one step closer to the final destination. The process of getting an email between two parties might take several MTAs.

What is *MUA*?

Mail User Agent (MUA) This is the technical term for an email client. The MUA's job is to capture the email in some format, including the recipient, and send it to the next link in the email chain >>> the MTA

Tell me about *Postfix*

Postfix is an MTA that came out of IBM Research and is still actively developed by the open source community. Postfix has extensive policy configuration to prevent spam and separates concerns into separate processes for security.

What does this command do? lpstat -t

Provides a more detailed summary of how the system is configured

What does this command do? lpstat -s

Provides a status summary of how the system is configured

Tell me about *Qmail*

Qmail was written as a secure replacement to Sendmail. Like Postfix, the concerns are compartmentalized to prevent a successful compromise of one component from gaining access to other components. The configuration is fairly simple.

Tell me about *Sendmail*

Sendmail was once the most popular MTA on the internet. It can speak a variety of protocols order to connect different email systems. Sendmail is less of an MTA than it is a system for building an MTA out of a language called M4, and is therefore incredibly complicated.

What does this command do? lpstat

Shows a list of jobs queued by the current user to the default printer (lpstat with no options)

What does this command do? lpq -a

Shows all the printers on the system

Changes to */etc/aliases* does not go into effect immediately. What file does your MDA (Mail Delivery Agent) read?

The MDA reads a database file called: */etc/aliases.db*

Where are "mail" aliases stored?

They are system wide and they are stored in a file called */etc/aliases*. they are systemwide because an alias does not belong to a user.

What instructions should the *~/.forward* file contain?

They have the same instructions as those in the */etc/aliases* file. The only difference in the format is that there is no need to specify the aliased user, as it is the owner of the *~/.forward* file.

What does this alias do? support: | /usr/local/bin/new_ticket.sh

This destination is a script. In this instance the email would be passed to the script that would presumably ingest the email into a new support ticket.

What does this command do? lpr -P

This is the same as the lp -d command

What does this command do? *cancel Hewlett-Packard_HP_LaserJet*

This removes the job from the queue (default queue) *cancel Hewlett-Packard_HP_LaserJet*

What does this command do? lp -n 2 lpr -#2

This will print 2 copies - notice each command is different because of their BSD/SysV legacy

What does this command do? lp -d

This will specify a printing location other than the default location. Example: lp -d Hewlett-Packard_HP_LaserJet

What does this alias do? support: /var/log/support.please.ignore

This would redirect all email to the support account to a file in */var/log*. So you can redirect to a file.

True or False By default, the CUPS web interface only listens to requests from the machine that it's running on?

True

How do you define your own forwarding rules? What file do you have to create and where?

Users can define their own forwarding rules by placing a file called *.forward* (not the leading period) in their home directory, containing the forward instructions.

Can CUPS accept a printer job even if the printer is off?

Yes - it will be spooled to a disk in */var/spool/cups*

6.) Which of the following is not a typical Linux Mail Transfer Agent? a.) Exchange b.) Sendmail c.) Qmail d.) Postfix

a.) Exchange A is correct because Exchange is a commercial product made for Microsoft servers.

1.) Your printer, named JonathansDesk, had an error printing a document, and now CUPS has stopped the printer. How do you get the jobs printing again? a.) cupsenable JonathansDesk b.) lpq -P JonathansDesk c.) cupsaccpet JonathansDesk d.) cupsaccept -P JonathansDesk

a.) cupsenable JonathansDesk A is correct because the printer itself has been stopped, and cupsenable fixes that.

4.) A user calls you in a panic and says he printed something to a printer called OfficePrinterand it's sending out page after page of junk. You turn to your command line and check the queue: OfficePrinter is printing Rank Owner Job File(s) Total Size 1st john 3 randomjunk 283958bytes How do you stop the job? a.) lprm -P OfficePrinter b.) lprm -P OfficePrinter 1 c.) lpq -P OfficePrinter --delete-all d.) Turn off the printer

a.) lprm -P OfficePrinter A is correct because the *lprm* command deletes a job from the printer named by the *-P* option.

What is the format of the */etc/aliases* file?

alias: recipient1, recipient2, recipient3, etc... There can be 1 or many

3.) Where are CUPS configuration files stored? a.) /etc/cupsd b.) /etc/cups c.) /var/lib/cupsd d.) var/etc/cups

b.) /etc/cups B is correct because that is the location of the CUPS configuration files.

9.) A user comes to you and asks how she can send all her email to her second account, [email protected], instead of reading it locally. What are the instructions you would give her? a.) Run sendmail -f [email protected] b.) Add [email protected] to ~/.forward c.) Add [email protected] to /etc/aliases d.) Add [email protected] to ~/.aliases

b.) Add [email protected] to ~/.forward B is correct because the user's .forward file tells the mail delivery agent to forward mail to another account instead of delivering locally.


Related study sets

AIS Chapter 3 : Information Technology and AISs

View Set

AD Banker Health and Life Chapter 15 Terms/Definitions

View Set

1.1 Compare and contrast different types of social engineering techniques.

View Set

Roman Empire & Germanic Tribes 9/29

View Set

NCLEX Questions: Gall Bladder Disease

View Set