330 likes | 609 Views
Server Configuration. Print Server. Introduction. Sharing printers is a good way to save money and make your printing more efficient. You can configure your Fedora or RHEL printer as a remote CUPS printer or Samba printer. CUPS. Common UNIX Printing Service
E N D
Server Configuration Print Server
Introduction • Sharing printers is a good way to save money and make your printing more efficient. • You can configure your Fedora or RHEL printer as a remote CUPS printer or Samba printer
CUPS • Common UNIX Printing Service • Printer Configuration window (system-config-printer command) • When a local printer is configured, print commands (such as lpr) are available for carrying out the actual printing. Commands also exist for querying print queues (lpq), manipulating print queues (lpc), and removing print jobs (lprm)
Features of CUPS • IPP - At its heart, CUPS is based on the Internet Printing Protocol www.pwg.org/ipp), a standard that was created to simplify how printers can be shared over IP networks. • Drivers - CUPS also standardized how printer drivers are created. • Printer classes - Using printer classes, you can create multiple print server entries that point to the same printer or one print server entry that points to multiple printers. • UNIX print commands - To integrate into Linux and other UNIX environments, CUPS offers versions of standard commands for printing and managing printers that have been traditionally offered with UNIX systems.
Configuration files • Configuration files for CUPS are contained in the /etc/cups directory • cupsd.conf : It identifies permission, authentication, and other information for the printer daemon • printers.conf : It identifies addresses and options for configured printers
Setting up printers • Deamons : cupsd • system-config-printer
Adding a Local Printer • service cups restart • system-config-printer & • Click New Printer. A New Printer window appears • Add the following information and then click Forward: • Printer Name - The name must begin with a letter, but after the initial letter, it can contain a combination of letters, numbers, dashes (-), and underscores (_). For example, an HP printer on a computer named maple could be named hp-maple. • Description • Location
If the printer you want to configure is detected, simply select it and click Forward • If not • choose the device to which the printer is connected (LPT #1 and Serial Port #1 are the first parallel and serial ports, respectively) and click Forward. (Type /usr/sbin/lpinfo -v | less from a shell to see all available ports.) • Driver Installation • Select the printer model for your printer. If there are multiple drivers avaialable for the model, you can choose which one you want from the Drivers box.
Tip • If your printer doesn't appear on the list but supports PCL (which is HP's Printer Control Language), select from one of several generic PCL drivers. If your printer supports PostScript, you can select PostScript printer from the list. Selecting Raw Print Queue enables you to send documents to the printer that are already formatted for that printer type.
With your printer model selected, click the Printer, Driver, or PPD buttons at the bottom of the screen. In many cases, you will see good information from the Linux Printing Database about how your printer is configured and how to tune it further. Click Forward to continue. • If the information looks correct, click Apply to create the entry for your printer. You are returned to the Printer configuration main window, with the new printer listed under Local Printers
Click the name of the printer you just added, then click Print Test Page
Editing a Local Printer • Settings - The Description, Location, Device URI, and Make and Model information you created earlier are displayed on this tab • State - Select check boxes to indicate whether or not the printer will print jobs that are in the queue (Enabled), accept new jobs for printing (Accepting Jobs), or be available to be shared with other computers that can communicate with your compter (Shared). • Make Default Printer - Select this button to have the printer be the default printer.
Policies • Policies - Click the Policies tab. From this tab, you can set the following items: • Banner - Add banner pages at the beginning or end of a job. This is good practice for a printer that is shared by many people. The banner page helps you sort who gets which print job. The standard banner page shows the ID of the print job, the title of the file, the user that requested the print job, and any billing information associated with it. • Policies - In case of error, the stop-printer selection causes all printing to that printer to stop. You can also select to have the job discarded (abort-job) or retried (retry-job) in the event of an error condition.
Access control - If your printer is a shared printer, you can select this tab to create a list of users that is either allowed access to the printer (with all others denied) or denied access to the printer (with all others allowed). • Printer Options - Click Printer Options to set defaults for options related to the printer driver. The available options are different for different printers. E.g. media size, gray scale, resolution etc
Printer Options • The available options are different for different printers • Watermark • Resolution Enhancement • Media Size - The default is U.S. letter size, but you can also ask the printer to print legal size, envelopes, ISO A4 standard or several other page sizes. • Media Source - Choose which tray to print from. Select Tray 1 to insert pages manually. • Levels of Gray - Choose to use the printer's current levels of gray or have enhanced or standard gray levels turned on. • Resolution - Select the default printing resolution (such as 300, 600, or 1,200 dots per inch). Higher resolutions result in better quality, but take longer to print. • EconoMode - Either use the printer's current setting or choose a mode where you save toner or one where you have the highest possible quality
Configuring Remote Printers • Supported remote printer connections include Networked CUPS (IPP) printers, Networked UNIX (LPD) printers, Networked Windows (SMB) printers, Networked Novell (NCP) printers, and JetDirect printers. (Of course, both CUPS and UNIX print servers can be run from Linux systems, as well as other UNIX systems.)
Configuring Remote Printers • Click New Printer. The New Printer window appears • Add the Printer Name, Description, and Location for the printer and click Forward. The Select Connection window appears.
Configuring Remote Printers • Depending on the type of ports you have on your computer, select one of the following: • LPT #1 - For a printer connected to your parallel port. • Serial Port #1 - For a printer connnected to your serial port. • AppleSocket/HP JetDirect - For a JetDirect printer. • Internet Printing Protocol (IPP) - For a CUPS or other IPP printer. • LPD/LPR Host or Printer - For a UNIX printer. • Windows Printer via SAMBA - For a Windows system printer. • Continue following the steps in whichever of the following sections is appropriate.
Adding a Remote CUPS Printer • Hostname : an IP address or TCP/IP hostname for the computer (the TCP/IP name is typically accessible from your /etc/hosts file or through a DNS name server). • Printername : hp/300dpi or hp/1200dpi. A slash character separates the print queue name from the printer instance. • Same Procedure for local printer setup
Configuring Print Servers • Configuring a Shared CUPS Printer • Printer configuration window • Click the name of the printer you want to share • Select the Shared box • If you want only selected users to access your printer, select the Access Control tab. Select Deny Printing for Everyone Except These Users, type each user you want to allow to use the printer, and click Add to add each user. Likewise, you could select Allow Printing for Everyone Except These Users and add selected users to be excluded from those allowed to print • Apply to make the changes permanent
If Failed • Open your firewall - If you have a restrictive firewall, it may not permit remote users to access your printers. You must allow access to port 513 (UDP and TCP) and possibly port 631 to allow access to printing on your computer • Enable LPD-style printing - Certain applications may require an older LPD-style printing service in order to print on your shared printer. To enable LPD-style printing on your CUPS server, you must turn on the cups-lpd service. As root user, type chkconfigcups-lpd on. Then restart the xinetd daemon (service xinetd restart) • Check names and addresses
Configuring a Shared Samba Printer • /etc/samba/smb.conf
Configuring a Shared Samba Printer • [global] • workgroup = MYGROUP • serverstring = Samba Server • security = share • printcap name = /etc/printcap • load printers = yes • printing = cups • encrypt passwords = yes • smb passwd file = /etc/samba/smbpasswd • unix password sync = Yes
Configuring a Shared Samba Printer • [printers] • comment = All Printers • path = /var/spool/samba • guest ok = yes • browseable = no • writeable = no • printable = yes
Configuring a Shared Samba Printer • load printers = yes • printing = cups • printcap name = cups • printer admin = root, @ntadmins