printing with cups (linux)
TRANSCRIPT
Printing with CUPSCUPS (COMMON UNIX PRINTING SYSTEM)
A printing system handles the tasks involved in getting a print job from an application
(or the command line) through the appropriate filters
LPD and LPR Traditionally UNIX had two printing systems the BSD Line Printer Daemon (LPD)
and the System V Line Printer system (LPR) Linux adopted these systems at first and both UNIX
and Linux have seen modifications to and replacements for these systems Today CUPS is the
default printing system under FedoraRHEL
1 CUPS CUPS (Common UNIX Printing System) is a cross-platform print server built around IPP (next)
2 CUPS provides many printer drivers and can print different types of files including PostScript
3 Because it is built on IPP and written to be portable CUPS runs under many operating systems including Linux and Windows Other UNIX variants including Mac OS X use CUPS recent versions of Windows include the ability to print to IPP printers
4 Thus CUPS is an ideal solution for printing in a heterogeneous environment
5 CUPS provides System V and BSD command-line interfaces and in addition to IPP supports LPDLPR HTTP SMB and JetDirect (socket) protocols among others
Network printers Printers connected directly to a network are functionally equivalent to printers
connected to a system running a print server They listen on the same ports as systems running
print servers and they queue jobs
Printers and queues On a modern computing system when you ldquosend a job to the printerrdquo you actually add the job to the list of jobs waiting their turn to be printed on a printer This list is
called a print queue or simply a queue The phrase configuring (or setting up) a printer is often used to mean configuring a (print) queue This chapter uses these phrases interchangeably
Prerequisites
Make sure the following packages are installed (most are installed with the base FedoraRHEL system)
bull cups
bull system-config-printer (optional)
bull cups-pdf (optional Fedora only sets up a virtual PDF printer)
The CUPS Web interface requires an X server and a Web browser Although it is a poor solution
a text Web browser such as elinks (elinks package) will work too
cups init script Run chkconfig to cause CUPS (the cupsd daemon) to start when the system goes into
multiuser mode
chkconfig cups on
Start CUPS
service cups start
Firewall A CUPS server normally uses TCP port 631 for an IPP connection and port 80 for
an LPRLPD connection If the CUPS server system accepts print jobs from remote
systems and is running a firewall you need to open one or both of these ports
PDF printer You can set up a virtual PDF printer by installing the cups-pdf package or you can
set up this printer manually
Configuring a Printer Using system-config-printerMain menu System Administration Printing (RHEL) or give the command
systemconfig-printer from a terminal emulator or Run Application window (ALT-F2)
Default printer Highlight a printer in the Printing window and select menubar Printer Set as
Default from the window menu to specify the highlighted printer as the default printer If just
one printer appears in the Printing window it is the default printer you do not have to set it up
as such
Server Settings Select menubar Server Settings from the Printing window to display the Server
Settings window The top two check boxes in this window specify whether systemconfig-
printer displays printers that are shared by other systems and whether the local system
publishes printers it shares You control whether a specific printer is shared from the Policies
selection of the Printer Properties window (next)
Configuration Selections
Select menubar Printer Properties to display the Printer Properties window
This section describes the six selections found in the frame at the left side of the
Printer Properties window These selections allow you to configure the printer you
chose in the Printing window
The text boxes labeled Description and Location hold information that can help users identify
The printer The system does not use this information change it as you like For example
it might be helpful to put the physical location of the printer such as Samrsquos Office in the text
box labeled Location The text boxes labeled Device URI and Make and Model specify the
location of the printer on the computer or network and type of the printer
Policies The Policies selection enables you to control printer state sharing and banners
Under the word State are check boxes labeled Enabled Accepting jobs and Shared
Putting a tick in the check box labeled Shared shares the printer with other systems if the
local system publishes shared printers (see ldquoServer Settingsrdquo) The Policies tab also controls
whether the printer prints banners before and after jobs and what CUPS does when the printer
reports an error
Access Control The Access Control selection enables you to set the policy for printer access By
default anyone can use the printer To restrict access you can create a blacklist of
users who are not allowed to use it Alternatively you can prohibit anyone from
using the printer and then create a whitelist of users who are allowed to use it
Printer Options The Printer Options selection controls image quality paper size and source
(tray) and other generic printer options
Setting Up a Local or Remote PrinterThis section describes how to set up three types of printers for local use a printer
attached to the local system a printer hosted by another system and a printer that
resides on the local network (a network printer)
The system-config-printer utility looks for printers attached to the system or the local network It
then asks if you want to adjust the firewall so the local system can detect printers on the
network (Fedora only) and displays the New Printer window
Specifying a URI The easiest way to locate a remote printer that is not listed is to select Find
Network Printer under Network Printer in the frame labeled Select Device Then enter in the
text box labeled Host the name of the host the printer is attached to (the server) or
for a network printer the name of the printer You can specify an IP address instead of
a hostname
Click Find If it finds a printer system-config-printer displays the name of
the printer under Network Printer and fills in information about the printer on the
right side of the window
If the printer is not listed select Other (for a local printer) or one of the selections
under Network Printer (for a remote printer) from the frame labeled Select Device
system-config-printer displays appropriate text boxes on the right side of the window
All selections under Network Printer require you to specify a Host and a Queue or
Port number These values locate the printer on the network
To specify the queue for an LPDLPR printer use the form printer-name for an IPP
printer use the form printersprinter-name for an HP JetDirect-compatible network
printer specify the printer-name and Port number Replace printer-name with the
name of the printer on the server
If you are unsure of the name of a printer give the command lpstat ndashp on the server to
display the names of all printers on that system After selecting or specifying a printer
click the button labeled Verify (if present) to make sure the printer is accessible and
then click Forward The system-config-printer utility searches for the printer driver
At this point the system-config-printer utility closes the New Printer window asks if
you want to print a test page and displays the new printer in the Printing window
If you have more than one print queue and want to set up the new print queue to be
the default highlight the printer and select menubar Printer Set As Default
Sharing CUPS PrintersDisplay the Server Settings window by selecting menubar Server Settings and put a tick in the
Check box labeled Publish shared printers connected to this system Using this technique
allows you to chose whether to share each printer
IPP facilitates remote printing The Listen directive in the CUPS configuration file
etccupscupsdconf specifies which IP address and port or which domain socket path
CUPS binds to and accepts requests on The Listen directive has the following format
Listen IPport | path
where IP is the IP address that CUPS accepts connections on port is the port number
that CUPS listens on for connections on IP and path is the pathname of the domain
socket CUPS uses to communicate with printers CUPS typically uses port 631 and by
default binds to localhost Thus it accepts connections from the loopback service of
the local system only CUPS uses varruncupscupssock a local domain socket to
communicate with local printers It can also use a Port directive to specify the port
number it listens to for HTTP requests
$ grep -i listen etccupscupsdconf
Only listen for connections from the local machine
Listen localhost631
Listen varruncupscupssock
To allow other systems to connect to the CUPS server on the local system you must
instruct CUPS to bind to an IP address that the other systems can reach First
remove or comment out the Listen localhost631 directive leave the other Listen
directive in place
Listen localhost631
Listen varruncupscupssock
In place of the commented-out Listen directive use an access control list to permit
only selected machines to connect to local printers An access control list is
defined inside a ltLocationgt container (see page 934 for the Apache equivalent)
The following example allows only the system at IP address 1921681101 and
the local system to print to the specified printer
ltLocation gt
Order AllowDeny
Allow access from the local system and 1921681101
Allow from localhost
Allow from 1921681101
Uncomment the following line to permit access from all systems
Allow LOCAL
ltLocationgt
The LOCAL macro is internal to CUPS and specifies the local system This macro
accepts communication from any address that resolves to the local system Specify
Allow LOCAL to share the printer with all systems
Print from WindowsPrint Using CUPS
Modern versions of Windows (2000 and later) support IPP and as a result can communicate
directly with CUPS To use this feature you must have CUPS configured on
the Linux print server to allow remote IPP printing you also need to create a new
printer on the Windows system that points to the IP address of the Linux print server
First set up the etccupscupsdconf file to allow network printing from a client as
explained in ldquoSharing CUPS Printersrdquo
Windows XP From Windows XP go to Control Panel1048644Printers and Faxes and click Add Printer
Click Next in the introductory window and select A network printer or a printer
attached to another computer Click Next Select Connect to a printer on the Internet
or on a home or office network Continue following the next paragraph at
ldquoEnter URLrdquo
Windows 7 From Windows 7 go to Control Panel1048644Devices and Printers and click Add a
printer Click Add a network wireless or Bluetooth printer Assuming Windows
does not find the printer click The printer that I want isnrsquot listed Click the radio
button labeled Select a shared printer by name
Enter URL Enter the following information in the text box (under Windows XP it is labeled URL)
httphostname631printersprinter-name
where hostname is the name or IP address of the Linux CUPS server system and
printer-name is the name of the printer on that system For example for the printer
named dog88 on the system named dog at IP address 192168012 you could enter
httpdog631printersdog88 or http192168012631printersdog88 If you
use a hostname it must be defined in the hosts file on the Windows machine Click
Next Windows requests that you specify the manufacturer and model of printer or
provide a driver for the printer If you supply a printer driver use the Windows version
of the driver
Print Using SambaSamba must be set up so that the Windows user who will be printing is mapped to a
Linux user (including mapping the Windows guest user to the Linux user nobody)
Windows supports printer sharing via SMB which allows a printer to be shared
transparently between Windows systems using the same mechanism as file sharing
Samba allows Windows users to use printers connected to Linux systems just as
they would use any other shared printers
When you use rpm to install Samba it creates a directory named varspoolsamba
that is owned by the root account and that anyone can read from and write to
$ ls -ld varspoolsamba
drwxrwxrwt 2 root root 4096 02-03 1523 varspoolsamba
Under Fedora put the following two lines in the [global] section of the etcsambasmbconf
file Under RHEL these lines are set up by default you need only change the printcap name as
shown
[global]
printing = cups
printcap name = cups
The printerrsquos share is listed in the [printers] section in smbconf In the following
example the path is the path Samba uses as a spool directory and is not a normal
share path The settings allow anyone including guest to use the printer The
[printers] section in the default smbconf file has the following entries which are
appropriate for most setups
[printers]
comment = All Printers
path = varspoolsamba
browseable = no
guest ok = no
writable = no
printable = yes
Printing to WindowsCUPS views a printer on a Windows machine exactly the same way it views any
other printer The only difference is the URI you need to specify when connecting it
To configure a printer connected to a Windows machine click the Administration
tab in the CUPS Web interface and select Add Printer just as you would for a local
printer
When you are asked to select the device choose Windows Printer via SAMBA
Enter the URI of the printer in the following format
smbwindows_systemprinter_name
where windows_system can be an IP address or a hostname After you have added
the printer you can use it as you would any other printer
A printing system handles the tasks involved in getting a print job from an application
(or the command line) through the appropriate filters
LPD and LPR Traditionally UNIX had two printing systems the BSD Line Printer Daemon (LPD)
and the System V Line Printer system (LPR) Linux adopted these systems at first and both UNIX
and Linux have seen modifications to and replacements for these systems Today CUPS is the
default printing system under FedoraRHEL
1 CUPS CUPS (Common UNIX Printing System) is a cross-platform print server built around IPP (next)
2 CUPS provides many printer drivers and can print different types of files including PostScript
3 Because it is built on IPP and written to be portable CUPS runs under many operating systems including Linux and Windows Other UNIX variants including Mac OS X use CUPS recent versions of Windows include the ability to print to IPP printers
4 Thus CUPS is an ideal solution for printing in a heterogeneous environment
5 CUPS provides System V and BSD command-line interfaces and in addition to IPP supports LPDLPR HTTP SMB and JetDirect (socket) protocols among others
Network printers Printers connected directly to a network are functionally equivalent to printers
connected to a system running a print server They listen on the same ports as systems running
print servers and they queue jobs
Printers and queues On a modern computing system when you ldquosend a job to the printerrdquo you actually add the job to the list of jobs waiting their turn to be printed on a printer This list is
called a print queue or simply a queue The phrase configuring (or setting up) a printer is often used to mean configuring a (print) queue This chapter uses these phrases interchangeably
Prerequisites
Make sure the following packages are installed (most are installed with the base FedoraRHEL system)
bull cups
bull system-config-printer (optional)
bull cups-pdf (optional Fedora only sets up a virtual PDF printer)
The CUPS Web interface requires an X server and a Web browser Although it is a poor solution
a text Web browser such as elinks (elinks package) will work too
cups init script Run chkconfig to cause CUPS (the cupsd daemon) to start when the system goes into
multiuser mode
chkconfig cups on
Start CUPS
service cups start
Firewall A CUPS server normally uses TCP port 631 for an IPP connection and port 80 for
an LPRLPD connection If the CUPS server system accepts print jobs from remote
systems and is running a firewall you need to open one or both of these ports
PDF printer You can set up a virtual PDF printer by installing the cups-pdf package or you can
set up this printer manually
Configuring a Printer Using system-config-printerMain menu System Administration Printing (RHEL) or give the command
systemconfig-printer from a terminal emulator or Run Application window (ALT-F2)
Default printer Highlight a printer in the Printing window and select menubar Printer Set as
Default from the window menu to specify the highlighted printer as the default printer If just
one printer appears in the Printing window it is the default printer you do not have to set it up
as such
Server Settings Select menubar Server Settings from the Printing window to display the Server
Settings window The top two check boxes in this window specify whether systemconfig-
printer displays printers that are shared by other systems and whether the local system
publishes printers it shares You control whether a specific printer is shared from the Policies
selection of the Printer Properties window (next)
Configuration Selections
Select menubar Printer Properties to display the Printer Properties window
This section describes the six selections found in the frame at the left side of the
Printer Properties window These selections allow you to configure the printer you
chose in the Printing window
The text boxes labeled Description and Location hold information that can help users identify
The printer The system does not use this information change it as you like For example
it might be helpful to put the physical location of the printer such as Samrsquos Office in the text
box labeled Location The text boxes labeled Device URI and Make and Model specify the
location of the printer on the computer or network and type of the printer
Policies The Policies selection enables you to control printer state sharing and banners
Under the word State are check boxes labeled Enabled Accepting jobs and Shared
Putting a tick in the check box labeled Shared shares the printer with other systems if the
local system publishes shared printers (see ldquoServer Settingsrdquo) The Policies tab also controls
whether the printer prints banners before and after jobs and what CUPS does when the printer
reports an error
Access Control The Access Control selection enables you to set the policy for printer access By
default anyone can use the printer To restrict access you can create a blacklist of
users who are not allowed to use it Alternatively you can prohibit anyone from
using the printer and then create a whitelist of users who are allowed to use it
Printer Options The Printer Options selection controls image quality paper size and source
(tray) and other generic printer options
Setting Up a Local or Remote PrinterThis section describes how to set up three types of printers for local use a printer
attached to the local system a printer hosted by another system and a printer that
resides on the local network (a network printer)
The system-config-printer utility looks for printers attached to the system or the local network It
then asks if you want to adjust the firewall so the local system can detect printers on the
network (Fedora only) and displays the New Printer window
Specifying a URI The easiest way to locate a remote printer that is not listed is to select Find
Network Printer under Network Printer in the frame labeled Select Device Then enter in the
text box labeled Host the name of the host the printer is attached to (the server) or
for a network printer the name of the printer You can specify an IP address instead of
a hostname
Click Find If it finds a printer system-config-printer displays the name of
the printer under Network Printer and fills in information about the printer on the
right side of the window
If the printer is not listed select Other (for a local printer) or one of the selections
under Network Printer (for a remote printer) from the frame labeled Select Device
system-config-printer displays appropriate text boxes on the right side of the window
All selections under Network Printer require you to specify a Host and a Queue or
Port number These values locate the printer on the network
To specify the queue for an LPDLPR printer use the form printer-name for an IPP
printer use the form printersprinter-name for an HP JetDirect-compatible network
printer specify the printer-name and Port number Replace printer-name with the
name of the printer on the server
If you are unsure of the name of a printer give the command lpstat ndashp on the server to
display the names of all printers on that system After selecting or specifying a printer
click the button labeled Verify (if present) to make sure the printer is accessible and
then click Forward The system-config-printer utility searches for the printer driver
At this point the system-config-printer utility closes the New Printer window asks if
you want to print a test page and displays the new printer in the Printing window
If you have more than one print queue and want to set up the new print queue to be
the default highlight the printer and select menubar Printer Set As Default
Sharing CUPS PrintersDisplay the Server Settings window by selecting menubar Server Settings and put a tick in the
Check box labeled Publish shared printers connected to this system Using this technique
allows you to chose whether to share each printer
IPP facilitates remote printing The Listen directive in the CUPS configuration file
etccupscupsdconf specifies which IP address and port or which domain socket path
CUPS binds to and accepts requests on The Listen directive has the following format
Listen IPport | path
where IP is the IP address that CUPS accepts connections on port is the port number
that CUPS listens on for connections on IP and path is the pathname of the domain
socket CUPS uses to communicate with printers CUPS typically uses port 631 and by
default binds to localhost Thus it accepts connections from the loopback service of
the local system only CUPS uses varruncupscupssock a local domain socket to
communicate with local printers It can also use a Port directive to specify the port
number it listens to for HTTP requests
$ grep -i listen etccupscupsdconf
Only listen for connections from the local machine
Listen localhost631
Listen varruncupscupssock
To allow other systems to connect to the CUPS server on the local system you must
instruct CUPS to bind to an IP address that the other systems can reach First
remove or comment out the Listen localhost631 directive leave the other Listen
directive in place
Listen localhost631
Listen varruncupscupssock
In place of the commented-out Listen directive use an access control list to permit
only selected machines to connect to local printers An access control list is
defined inside a ltLocationgt container (see page 934 for the Apache equivalent)
The following example allows only the system at IP address 1921681101 and
the local system to print to the specified printer
ltLocation gt
Order AllowDeny
Allow access from the local system and 1921681101
Allow from localhost
Allow from 1921681101
Uncomment the following line to permit access from all systems
Allow LOCAL
ltLocationgt
The LOCAL macro is internal to CUPS and specifies the local system This macro
accepts communication from any address that resolves to the local system Specify
Allow LOCAL to share the printer with all systems
Print from WindowsPrint Using CUPS
Modern versions of Windows (2000 and later) support IPP and as a result can communicate
directly with CUPS To use this feature you must have CUPS configured on
the Linux print server to allow remote IPP printing you also need to create a new
printer on the Windows system that points to the IP address of the Linux print server
First set up the etccupscupsdconf file to allow network printing from a client as
explained in ldquoSharing CUPS Printersrdquo
Windows XP From Windows XP go to Control Panel1048644Printers and Faxes and click Add Printer
Click Next in the introductory window and select A network printer or a printer
attached to another computer Click Next Select Connect to a printer on the Internet
or on a home or office network Continue following the next paragraph at
ldquoEnter URLrdquo
Windows 7 From Windows 7 go to Control Panel1048644Devices and Printers and click Add a
printer Click Add a network wireless or Bluetooth printer Assuming Windows
does not find the printer click The printer that I want isnrsquot listed Click the radio
button labeled Select a shared printer by name
Enter URL Enter the following information in the text box (under Windows XP it is labeled URL)
httphostname631printersprinter-name
where hostname is the name or IP address of the Linux CUPS server system and
printer-name is the name of the printer on that system For example for the printer
named dog88 on the system named dog at IP address 192168012 you could enter
httpdog631printersdog88 or http192168012631printersdog88 If you
use a hostname it must be defined in the hosts file on the Windows machine Click
Next Windows requests that you specify the manufacturer and model of printer or
provide a driver for the printer If you supply a printer driver use the Windows version
of the driver
Print Using SambaSamba must be set up so that the Windows user who will be printing is mapped to a
Linux user (including mapping the Windows guest user to the Linux user nobody)
Windows supports printer sharing via SMB which allows a printer to be shared
transparently between Windows systems using the same mechanism as file sharing
Samba allows Windows users to use printers connected to Linux systems just as
they would use any other shared printers
When you use rpm to install Samba it creates a directory named varspoolsamba
that is owned by the root account and that anyone can read from and write to
$ ls -ld varspoolsamba
drwxrwxrwt 2 root root 4096 02-03 1523 varspoolsamba
Under Fedora put the following two lines in the [global] section of the etcsambasmbconf
file Under RHEL these lines are set up by default you need only change the printcap name as
shown
[global]
printing = cups
printcap name = cups
The printerrsquos share is listed in the [printers] section in smbconf In the following
example the path is the path Samba uses as a spool directory and is not a normal
share path The settings allow anyone including guest to use the printer The
[printers] section in the default smbconf file has the following entries which are
appropriate for most setups
[printers]
comment = All Printers
path = varspoolsamba
browseable = no
guest ok = no
writable = no
printable = yes
Printing to WindowsCUPS views a printer on a Windows machine exactly the same way it views any
other printer The only difference is the URI you need to specify when connecting it
To configure a printer connected to a Windows machine click the Administration
tab in the CUPS Web interface and select Add Printer just as you would for a local
printer
When you are asked to select the device choose Windows Printer via SAMBA
Enter the URI of the printer in the following format
smbwindows_systemprinter_name
where windows_system can be an IP address or a hostname After you have added
the printer you can use it as you would any other printer
1 CUPS CUPS (Common UNIX Printing System) is a cross-platform print server built around IPP (next)
2 CUPS provides many printer drivers and can print different types of files including PostScript
3 Because it is built on IPP and written to be portable CUPS runs under many operating systems including Linux and Windows Other UNIX variants including Mac OS X use CUPS recent versions of Windows include the ability to print to IPP printers
4 Thus CUPS is an ideal solution for printing in a heterogeneous environment
5 CUPS provides System V and BSD command-line interfaces and in addition to IPP supports LPDLPR HTTP SMB and JetDirect (socket) protocols among others
Network printers Printers connected directly to a network are functionally equivalent to printers
connected to a system running a print server They listen on the same ports as systems running
print servers and they queue jobs
Printers and queues On a modern computing system when you ldquosend a job to the printerrdquo you actually add the job to the list of jobs waiting their turn to be printed on a printer This list is
called a print queue or simply a queue The phrase configuring (or setting up) a printer is often used to mean configuring a (print) queue This chapter uses these phrases interchangeably
Prerequisites
Make sure the following packages are installed (most are installed with the base FedoraRHEL system)
bull cups
bull system-config-printer (optional)
bull cups-pdf (optional Fedora only sets up a virtual PDF printer)
The CUPS Web interface requires an X server and a Web browser Although it is a poor solution
a text Web browser such as elinks (elinks package) will work too
cups init script Run chkconfig to cause CUPS (the cupsd daemon) to start when the system goes into
multiuser mode
chkconfig cups on
Start CUPS
service cups start
Firewall A CUPS server normally uses TCP port 631 for an IPP connection and port 80 for
an LPRLPD connection If the CUPS server system accepts print jobs from remote
systems and is running a firewall you need to open one or both of these ports
PDF printer You can set up a virtual PDF printer by installing the cups-pdf package or you can
set up this printer manually
Configuring a Printer Using system-config-printerMain menu System Administration Printing (RHEL) or give the command
systemconfig-printer from a terminal emulator or Run Application window (ALT-F2)
Default printer Highlight a printer in the Printing window and select menubar Printer Set as
Default from the window menu to specify the highlighted printer as the default printer If just
one printer appears in the Printing window it is the default printer you do not have to set it up
as such
Server Settings Select menubar Server Settings from the Printing window to display the Server
Settings window The top two check boxes in this window specify whether systemconfig-
printer displays printers that are shared by other systems and whether the local system
publishes printers it shares You control whether a specific printer is shared from the Policies
selection of the Printer Properties window (next)
Configuration Selections
Select menubar Printer Properties to display the Printer Properties window
This section describes the six selections found in the frame at the left side of the
Printer Properties window These selections allow you to configure the printer you
chose in the Printing window
The text boxes labeled Description and Location hold information that can help users identify
The printer The system does not use this information change it as you like For example
it might be helpful to put the physical location of the printer such as Samrsquos Office in the text
box labeled Location The text boxes labeled Device URI and Make and Model specify the
location of the printer on the computer or network and type of the printer
Policies The Policies selection enables you to control printer state sharing and banners
Under the word State are check boxes labeled Enabled Accepting jobs and Shared
Putting a tick in the check box labeled Shared shares the printer with other systems if the
local system publishes shared printers (see ldquoServer Settingsrdquo) The Policies tab also controls
whether the printer prints banners before and after jobs and what CUPS does when the printer
reports an error
Access Control The Access Control selection enables you to set the policy for printer access By
default anyone can use the printer To restrict access you can create a blacklist of
users who are not allowed to use it Alternatively you can prohibit anyone from
using the printer and then create a whitelist of users who are allowed to use it
Printer Options The Printer Options selection controls image quality paper size and source
(tray) and other generic printer options
Setting Up a Local or Remote PrinterThis section describes how to set up three types of printers for local use a printer
attached to the local system a printer hosted by another system and a printer that
resides on the local network (a network printer)
The system-config-printer utility looks for printers attached to the system or the local network It
then asks if you want to adjust the firewall so the local system can detect printers on the
network (Fedora only) and displays the New Printer window
Specifying a URI The easiest way to locate a remote printer that is not listed is to select Find
Network Printer under Network Printer in the frame labeled Select Device Then enter in the
text box labeled Host the name of the host the printer is attached to (the server) or
for a network printer the name of the printer You can specify an IP address instead of
a hostname
Click Find If it finds a printer system-config-printer displays the name of
the printer under Network Printer and fills in information about the printer on the
right side of the window
If the printer is not listed select Other (for a local printer) or one of the selections
under Network Printer (for a remote printer) from the frame labeled Select Device
system-config-printer displays appropriate text boxes on the right side of the window
All selections under Network Printer require you to specify a Host and a Queue or
Port number These values locate the printer on the network
To specify the queue for an LPDLPR printer use the form printer-name for an IPP
printer use the form printersprinter-name for an HP JetDirect-compatible network
printer specify the printer-name and Port number Replace printer-name with the
name of the printer on the server
If you are unsure of the name of a printer give the command lpstat ndashp on the server to
display the names of all printers on that system After selecting or specifying a printer
click the button labeled Verify (if present) to make sure the printer is accessible and
then click Forward The system-config-printer utility searches for the printer driver
At this point the system-config-printer utility closes the New Printer window asks if
you want to print a test page and displays the new printer in the Printing window
If you have more than one print queue and want to set up the new print queue to be
the default highlight the printer and select menubar Printer Set As Default
Sharing CUPS PrintersDisplay the Server Settings window by selecting menubar Server Settings and put a tick in the
Check box labeled Publish shared printers connected to this system Using this technique
allows you to chose whether to share each printer
IPP facilitates remote printing The Listen directive in the CUPS configuration file
etccupscupsdconf specifies which IP address and port or which domain socket path
CUPS binds to and accepts requests on The Listen directive has the following format
Listen IPport | path
where IP is the IP address that CUPS accepts connections on port is the port number
that CUPS listens on for connections on IP and path is the pathname of the domain
socket CUPS uses to communicate with printers CUPS typically uses port 631 and by
default binds to localhost Thus it accepts connections from the loopback service of
the local system only CUPS uses varruncupscupssock a local domain socket to
communicate with local printers It can also use a Port directive to specify the port
number it listens to for HTTP requests
$ grep -i listen etccupscupsdconf
Only listen for connections from the local machine
Listen localhost631
Listen varruncupscupssock
To allow other systems to connect to the CUPS server on the local system you must
instruct CUPS to bind to an IP address that the other systems can reach First
remove or comment out the Listen localhost631 directive leave the other Listen
directive in place
Listen localhost631
Listen varruncupscupssock
In place of the commented-out Listen directive use an access control list to permit
only selected machines to connect to local printers An access control list is
defined inside a ltLocationgt container (see page 934 for the Apache equivalent)
The following example allows only the system at IP address 1921681101 and
the local system to print to the specified printer
ltLocation gt
Order AllowDeny
Allow access from the local system and 1921681101
Allow from localhost
Allow from 1921681101
Uncomment the following line to permit access from all systems
Allow LOCAL
ltLocationgt
The LOCAL macro is internal to CUPS and specifies the local system This macro
accepts communication from any address that resolves to the local system Specify
Allow LOCAL to share the printer with all systems
Print from WindowsPrint Using CUPS
Modern versions of Windows (2000 and later) support IPP and as a result can communicate
directly with CUPS To use this feature you must have CUPS configured on
the Linux print server to allow remote IPP printing you also need to create a new
printer on the Windows system that points to the IP address of the Linux print server
First set up the etccupscupsdconf file to allow network printing from a client as
explained in ldquoSharing CUPS Printersrdquo
Windows XP From Windows XP go to Control Panel1048644Printers and Faxes and click Add Printer
Click Next in the introductory window and select A network printer or a printer
attached to another computer Click Next Select Connect to a printer on the Internet
or on a home or office network Continue following the next paragraph at
ldquoEnter URLrdquo
Windows 7 From Windows 7 go to Control Panel1048644Devices and Printers and click Add a
printer Click Add a network wireless or Bluetooth printer Assuming Windows
does not find the printer click The printer that I want isnrsquot listed Click the radio
button labeled Select a shared printer by name
Enter URL Enter the following information in the text box (under Windows XP it is labeled URL)
httphostname631printersprinter-name
where hostname is the name or IP address of the Linux CUPS server system and
printer-name is the name of the printer on that system For example for the printer
named dog88 on the system named dog at IP address 192168012 you could enter
httpdog631printersdog88 or http192168012631printersdog88 If you
use a hostname it must be defined in the hosts file on the Windows machine Click
Next Windows requests that you specify the manufacturer and model of printer or
provide a driver for the printer If you supply a printer driver use the Windows version
of the driver
Print Using SambaSamba must be set up so that the Windows user who will be printing is mapped to a
Linux user (including mapping the Windows guest user to the Linux user nobody)
Windows supports printer sharing via SMB which allows a printer to be shared
transparently between Windows systems using the same mechanism as file sharing
Samba allows Windows users to use printers connected to Linux systems just as
they would use any other shared printers
When you use rpm to install Samba it creates a directory named varspoolsamba
that is owned by the root account and that anyone can read from and write to
$ ls -ld varspoolsamba
drwxrwxrwt 2 root root 4096 02-03 1523 varspoolsamba
Under Fedora put the following two lines in the [global] section of the etcsambasmbconf
file Under RHEL these lines are set up by default you need only change the printcap name as
shown
[global]
printing = cups
printcap name = cups
The printerrsquos share is listed in the [printers] section in smbconf In the following
example the path is the path Samba uses as a spool directory and is not a normal
share path The settings allow anyone including guest to use the printer The
[printers] section in the default smbconf file has the following entries which are
appropriate for most setups
[printers]
comment = All Printers
path = varspoolsamba
browseable = no
guest ok = no
writable = no
printable = yes
Printing to WindowsCUPS views a printer on a Windows machine exactly the same way it views any
other printer The only difference is the URI you need to specify when connecting it
To configure a printer connected to a Windows machine click the Administration
tab in the CUPS Web interface and select Add Printer just as you would for a local
printer
When you are asked to select the device choose Windows Printer via SAMBA
Enter the URI of the printer in the following format
smbwindows_systemprinter_name
where windows_system can be an IP address or a hostname After you have added
the printer you can use it as you would any other printer
Network printers Printers connected directly to a network are functionally equivalent to printers
connected to a system running a print server They listen on the same ports as systems running
print servers and they queue jobs
Printers and queues On a modern computing system when you ldquosend a job to the printerrdquo you actually add the job to the list of jobs waiting their turn to be printed on a printer This list is
called a print queue or simply a queue The phrase configuring (or setting up) a printer is often used to mean configuring a (print) queue This chapter uses these phrases interchangeably
Prerequisites
Make sure the following packages are installed (most are installed with the base FedoraRHEL system)
bull cups
bull system-config-printer (optional)
bull cups-pdf (optional Fedora only sets up a virtual PDF printer)
The CUPS Web interface requires an X server and a Web browser Although it is a poor solution
a text Web browser such as elinks (elinks package) will work too
cups init script Run chkconfig to cause CUPS (the cupsd daemon) to start when the system goes into
multiuser mode
chkconfig cups on
Start CUPS
service cups start
Firewall A CUPS server normally uses TCP port 631 for an IPP connection and port 80 for
an LPRLPD connection If the CUPS server system accepts print jobs from remote
systems and is running a firewall you need to open one or both of these ports
PDF printer You can set up a virtual PDF printer by installing the cups-pdf package or you can
set up this printer manually
Configuring a Printer Using system-config-printerMain menu System Administration Printing (RHEL) or give the command
systemconfig-printer from a terminal emulator or Run Application window (ALT-F2)
Default printer Highlight a printer in the Printing window and select menubar Printer Set as
Default from the window menu to specify the highlighted printer as the default printer If just
one printer appears in the Printing window it is the default printer you do not have to set it up
as such
Server Settings Select menubar Server Settings from the Printing window to display the Server
Settings window The top two check boxes in this window specify whether systemconfig-
printer displays printers that are shared by other systems and whether the local system
publishes printers it shares You control whether a specific printer is shared from the Policies
selection of the Printer Properties window (next)
Configuration Selections
Select menubar Printer Properties to display the Printer Properties window
This section describes the six selections found in the frame at the left side of the
Printer Properties window These selections allow you to configure the printer you
chose in the Printing window
The text boxes labeled Description and Location hold information that can help users identify
The printer The system does not use this information change it as you like For example
it might be helpful to put the physical location of the printer such as Samrsquos Office in the text
box labeled Location The text boxes labeled Device URI and Make and Model specify the
location of the printer on the computer or network and type of the printer
Policies The Policies selection enables you to control printer state sharing and banners
Under the word State are check boxes labeled Enabled Accepting jobs and Shared
Putting a tick in the check box labeled Shared shares the printer with other systems if the
local system publishes shared printers (see ldquoServer Settingsrdquo) The Policies tab also controls
whether the printer prints banners before and after jobs and what CUPS does when the printer
reports an error
Access Control The Access Control selection enables you to set the policy for printer access By
default anyone can use the printer To restrict access you can create a blacklist of
users who are not allowed to use it Alternatively you can prohibit anyone from
using the printer and then create a whitelist of users who are allowed to use it
Printer Options The Printer Options selection controls image quality paper size and source
(tray) and other generic printer options
Setting Up a Local or Remote PrinterThis section describes how to set up three types of printers for local use a printer
attached to the local system a printer hosted by another system and a printer that
resides on the local network (a network printer)
The system-config-printer utility looks for printers attached to the system or the local network It
then asks if you want to adjust the firewall so the local system can detect printers on the
network (Fedora only) and displays the New Printer window
Specifying a URI The easiest way to locate a remote printer that is not listed is to select Find
Network Printer under Network Printer in the frame labeled Select Device Then enter in the
text box labeled Host the name of the host the printer is attached to (the server) or
for a network printer the name of the printer You can specify an IP address instead of
a hostname
Click Find If it finds a printer system-config-printer displays the name of
the printer under Network Printer and fills in information about the printer on the
right side of the window
If the printer is not listed select Other (for a local printer) or one of the selections
under Network Printer (for a remote printer) from the frame labeled Select Device
system-config-printer displays appropriate text boxes on the right side of the window
All selections under Network Printer require you to specify a Host and a Queue or
Port number These values locate the printer on the network
To specify the queue for an LPDLPR printer use the form printer-name for an IPP
printer use the form printersprinter-name for an HP JetDirect-compatible network
printer specify the printer-name and Port number Replace printer-name with the
name of the printer on the server
If you are unsure of the name of a printer give the command lpstat ndashp on the server to
display the names of all printers on that system After selecting or specifying a printer
click the button labeled Verify (if present) to make sure the printer is accessible and
then click Forward The system-config-printer utility searches for the printer driver
At this point the system-config-printer utility closes the New Printer window asks if
you want to print a test page and displays the new printer in the Printing window
If you have more than one print queue and want to set up the new print queue to be
the default highlight the printer and select menubar Printer Set As Default
Sharing CUPS PrintersDisplay the Server Settings window by selecting menubar Server Settings and put a tick in the
Check box labeled Publish shared printers connected to this system Using this technique
allows you to chose whether to share each printer
IPP facilitates remote printing The Listen directive in the CUPS configuration file
etccupscupsdconf specifies which IP address and port or which domain socket path
CUPS binds to and accepts requests on The Listen directive has the following format
Listen IPport | path
where IP is the IP address that CUPS accepts connections on port is the port number
that CUPS listens on for connections on IP and path is the pathname of the domain
socket CUPS uses to communicate with printers CUPS typically uses port 631 and by
default binds to localhost Thus it accepts connections from the loopback service of
the local system only CUPS uses varruncupscupssock a local domain socket to
communicate with local printers It can also use a Port directive to specify the port
number it listens to for HTTP requests
$ grep -i listen etccupscupsdconf
Only listen for connections from the local machine
Listen localhost631
Listen varruncupscupssock
To allow other systems to connect to the CUPS server on the local system you must
instruct CUPS to bind to an IP address that the other systems can reach First
remove or comment out the Listen localhost631 directive leave the other Listen
directive in place
Listen localhost631
Listen varruncupscupssock
In place of the commented-out Listen directive use an access control list to permit
only selected machines to connect to local printers An access control list is
defined inside a ltLocationgt container (see page 934 for the Apache equivalent)
The following example allows only the system at IP address 1921681101 and
the local system to print to the specified printer
ltLocation gt
Order AllowDeny
Allow access from the local system and 1921681101
Allow from localhost
Allow from 1921681101
Uncomment the following line to permit access from all systems
Allow LOCAL
ltLocationgt
The LOCAL macro is internal to CUPS and specifies the local system This macro
accepts communication from any address that resolves to the local system Specify
Allow LOCAL to share the printer with all systems
Print from WindowsPrint Using CUPS
Modern versions of Windows (2000 and later) support IPP and as a result can communicate
directly with CUPS To use this feature you must have CUPS configured on
the Linux print server to allow remote IPP printing you also need to create a new
printer on the Windows system that points to the IP address of the Linux print server
First set up the etccupscupsdconf file to allow network printing from a client as
explained in ldquoSharing CUPS Printersrdquo
Windows XP From Windows XP go to Control Panel1048644Printers and Faxes and click Add Printer
Click Next in the introductory window and select A network printer or a printer
attached to another computer Click Next Select Connect to a printer on the Internet
or on a home or office network Continue following the next paragraph at
ldquoEnter URLrdquo
Windows 7 From Windows 7 go to Control Panel1048644Devices and Printers and click Add a
printer Click Add a network wireless or Bluetooth printer Assuming Windows
does not find the printer click The printer that I want isnrsquot listed Click the radio
button labeled Select a shared printer by name
Enter URL Enter the following information in the text box (under Windows XP it is labeled URL)
httphostname631printersprinter-name
where hostname is the name or IP address of the Linux CUPS server system and
printer-name is the name of the printer on that system For example for the printer
named dog88 on the system named dog at IP address 192168012 you could enter
httpdog631printersdog88 or http192168012631printersdog88 If you
use a hostname it must be defined in the hosts file on the Windows machine Click
Next Windows requests that you specify the manufacturer and model of printer or
provide a driver for the printer If you supply a printer driver use the Windows version
of the driver
Print Using SambaSamba must be set up so that the Windows user who will be printing is mapped to a
Linux user (including mapping the Windows guest user to the Linux user nobody)
Windows supports printer sharing via SMB which allows a printer to be shared
transparently between Windows systems using the same mechanism as file sharing
Samba allows Windows users to use printers connected to Linux systems just as
they would use any other shared printers
When you use rpm to install Samba it creates a directory named varspoolsamba
that is owned by the root account and that anyone can read from and write to
$ ls -ld varspoolsamba
drwxrwxrwt 2 root root 4096 02-03 1523 varspoolsamba
Under Fedora put the following two lines in the [global] section of the etcsambasmbconf
file Under RHEL these lines are set up by default you need only change the printcap name as
shown
[global]
printing = cups
printcap name = cups
The printerrsquos share is listed in the [printers] section in smbconf In the following
example the path is the path Samba uses as a spool directory and is not a normal
share path The settings allow anyone including guest to use the printer The
[printers] section in the default smbconf file has the following entries which are
appropriate for most setups
[printers]
comment = All Printers
path = varspoolsamba
browseable = no
guest ok = no
writable = no
printable = yes
Printing to WindowsCUPS views a printer on a Windows machine exactly the same way it views any
other printer The only difference is the URI you need to specify when connecting it
To configure a printer connected to a Windows machine click the Administration
tab in the CUPS Web interface and select Add Printer just as you would for a local
printer
When you are asked to select the device choose Windows Printer via SAMBA
Enter the URI of the printer in the following format
smbwindows_systemprinter_name
where windows_system can be an IP address or a hostname After you have added
the printer you can use it as you would any other printer
Prerequisites
Make sure the following packages are installed (most are installed with the base FedoraRHEL system)
bull cups
bull system-config-printer (optional)
bull cups-pdf (optional Fedora only sets up a virtual PDF printer)
The CUPS Web interface requires an X server and a Web browser Although it is a poor solution
a text Web browser such as elinks (elinks package) will work too
cups init script Run chkconfig to cause CUPS (the cupsd daemon) to start when the system goes into
multiuser mode
chkconfig cups on
Start CUPS
service cups start
Firewall A CUPS server normally uses TCP port 631 for an IPP connection and port 80 for
an LPRLPD connection If the CUPS server system accepts print jobs from remote
systems and is running a firewall you need to open one or both of these ports
PDF printer You can set up a virtual PDF printer by installing the cups-pdf package or you can
set up this printer manually
Configuring a Printer Using system-config-printerMain menu System Administration Printing (RHEL) or give the command
systemconfig-printer from a terminal emulator or Run Application window (ALT-F2)
Default printer Highlight a printer in the Printing window and select menubar Printer Set as
Default from the window menu to specify the highlighted printer as the default printer If just
one printer appears in the Printing window it is the default printer you do not have to set it up
as such
Server Settings Select menubar Server Settings from the Printing window to display the Server
Settings window The top two check boxes in this window specify whether systemconfig-
printer displays printers that are shared by other systems and whether the local system
publishes printers it shares You control whether a specific printer is shared from the Policies
selection of the Printer Properties window (next)
Configuration Selections
Select menubar Printer Properties to display the Printer Properties window
This section describes the six selections found in the frame at the left side of the
Printer Properties window These selections allow you to configure the printer you
chose in the Printing window
The text boxes labeled Description and Location hold information that can help users identify
The printer The system does not use this information change it as you like For example
it might be helpful to put the physical location of the printer such as Samrsquos Office in the text
box labeled Location The text boxes labeled Device URI and Make and Model specify the
location of the printer on the computer or network and type of the printer
Policies The Policies selection enables you to control printer state sharing and banners
Under the word State are check boxes labeled Enabled Accepting jobs and Shared
Putting a tick in the check box labeled Shared shares the printer with other systems if the
local system publishes shared printers (see ldquoServer Settingsrdquo) The Policies tab also controls
whether the printer prints banners before and after jobs and what CUPS does when the printer
reports an error
Access Control The Access Control selection enables you to set the policy for printer access By
default anyone can use the printer To restrict access you can create a blacklist of
users who are not allowed to use it Alternatively you can prohibit anyone from
using the printer and then create a whitelist of users who are allowed to use it
Printer Options The Printer Options selection controls image quality paper size and source
(tray) and other generic printer options
Setting Up a Local or Remote PrinterThis section describes how to set up three types of printers for local use a printer
attached to the local system a printer hosted by another system and a printer that
resides on the local network (a network printer)
The system-config-printer utility looks for printers attached to the system or the local network It
then asks if you want to adjust the firewall so the local system can detect printers on the
network (Fedora only) and displays the New Printer window
Specifying a URI The easiest way to locate a remote printer that is not listed is to select Find
Network Printer under Network Printer in the frame labeled Select Device Then enter in the
text box labeled Host the name of the host the printer is attached to (the server) or
for a network printer the name of the printer You can specify an IP address instead of
a hostname
Click Find If it finds a printer system-config-printer displays the name of
the printer under Network Printer and fills in information about the printer on the
right side of the window
If the printer is not listed select Other (for a local printer) or one of the selections
under Network Printer (for a remote printer) from the frame labeled Select Device
system-config-printer displays appropriate text boxes on the right side of the window
All selections under Network Printer require you to specify a Host and a Queue or
Port number These values locate the printer on the network
To specify the queue for an LPDLPR printer use the form printer-name for an IPP
printer use the form printersprinter-name for an HP JetDirect-compatible network
printer specify the printer-name and Port number Replace printer-name with the
name of the printer on the server
If you are unsure of the name of a printer give the command lpstat ndashp on the server to
display the names of all printers on that system After selecting or specifying a printer
click the button labeled Verify (if present) to make sure the printer is accessible and
then click Forward The system-config-printer utility searches for the printer driver
At this point the system-config-printer utility closes the New Printer window asks if
you want to print a test page and displays the new printer in the Printing window
If you have more than one print queue and want to set up the new print queue to be
the default highlight the printer and select menubar Printer Set As Default
Sharing CUPS PrintersDisplay the Server Settings window by selecting menubar Server Settings and put a tick in the
Check box labeled Publish shared printers connected to this system Using this technique
allows you to chose whether to share each printer
IPP facilitates remote printing The Listen directive in the CUPS configuration file
etccupscupsdconf specifies which IP address and port or which domain socket path
CUPS binds to and accepts requests on The Listen directive has the following format
Listen IPport | path
where IP is the IP address that CUPS accepts connections on port is the port number
that CUPS listens on for connections on IP and path is the pathname of the domain
socket CUPS uses to communicate with printers CUPS typically uses port 631 and by
default binds to localhost Thus it accepts connections from the loopback service of
the local system only CUPS uses varruncupscupssock a local domain socket to
communicate with local printers It can also use a Port directive to specify the port
number it listens to for HTTP requests
$ grep -i listen etccupscupsdconf
Only listen for connections from the local machine
Listen localhost631
Listen varruncupscupssock
To allow other systems to connect to the CUPS server on the local system you must
instruct CUPS to bind to an IP address that the other systems can reach First
remove or comment out the Listen localhost631 directive leave the other Listen
directive in place
Listen localhost631
Listen varruncupscupssock
In place of the commented-out Listen directive use an access control list to permit
only selected machines to connect to local printers An access control list is
defined inside a ltLocationgt container (see page 934 for the Apache equivalent)
The following example allows only the system at IP address 1921681101 and
the local system to print to the specified printer
ltLocation gt
Order AllowDeny
Allow access from the local system and 1921681101
Allow from localhost
Allow from 1921681101
Uncomment the following line to permit access from all systems
Allow LOCAL
ltLocationgt
The LOCAL macro is internal to CUPS and specifies the local system This macro
accepts communication from any address that resolves to the local system Specify
Allow LOCAL to share the printer with all systems
Print from WindowsPrint Using CUPS
Modern versions of Windows (2000 and later) support IPP and as a result can communicate
directly with CUPS To use this feature you must have CUPS configured on
the Linux print server to allow remote IPP printing you also need to create a new
printer on the Windows system that points to the IP address of the Linux print server
First set up the etccupscupsdconf file to allow network printing from a client as
explained in ldquoSharing CUPS Printersrdquo
Windows XP From Windows XP go to Control Panel1048644Printers and Faxes and click Add Printer
Click Next in the introductory window and select A network printer or a printer
attached to another computer Click Next Select Connect to a printer on the Internet
or on a home or office network Continue following the next paragraph at
ldquoEnter URLrdquo
Windows 7 From Windows 7 go to Control Panel1048644Devices and Printers and click Add a
printer Click Add a network wireless or Bluetooth printer Assuming Windows
does not find the printer click The printer that I want isnrsquot listed Click the radio
button labeled Select a shared printer by name
Enter URL Enter the following information in the text box (under Windows XP it is labeled URL)
httphostname631printersprinter-name
where hostname is the name or IP address of the Linux CUPS server system and
printer-name is the name of the printer on that system For example for the printer
named dog88 on the system named dog at IP address 192168012 you could enter
httpdog631printersdog88 or http192168012631printersdog88 If you
use a hostname it must be defined in the hosts file on the Windows machine Click
Next Windows requests that you specify the manufacturer and model of printer or
provide a driver for the printer If you supply a printer driver use the Windows version
of the driver
Print Using SambaSamba must be set up so that the Windows user who will be printing is mapped to a
Linux user (including mapping the Windows guest user to the Linux user nobody)
Windows supports printer sharing via SMB which allows a printer to be shared
transparently between Windows systems using the same mechanism as file sharing
Samba allows Windows users to use printers connected to Linux systems just as
they would use any other shared printers
When you use rpm to install Samba it creates a directory named varspoolsamba
that is owned by the root account and that anyone can read from and write to
$ ls -ld varspoolsamba
drwxrwxrwt 2 root root 4096 02-03 1523 varspoolsamba
Under Fedora put the following two lines in the [global] section of the etcsambasmbconf
file Under RHEL these lines are set up by default you need only change the printcap name as
shown
[global]
printing = cups
printcap name = cups
The printerrsquos share is listed in the [printers] section in smbconf In the following
example the path is the path Samba uses as a spool directory and is not a normal
share path The settings allow anyone including guest to use the printer The
[printers] section in the default smbconf file has the following entries which are
appropriate for most setups
[printers]
comment = All Printers
path = varspoolsamba
browseable = no
guest ok = no
writable = no
printable = yes
Printing to WindowsCUPS views a printer on a Windows machine exactly the same way it views any
other printer The only difference is the URI you need to specify when connecting it
To configure a printer connected to a Windows machine click the Administration
tab in the CUPS Web interface and select Add Printer just as you would for a local
printer
When you are asked to select the device choose Windows Printer via SAMBA
Enter the URI of the printer in the following format
smbwindows_systemprinter_name
where windows_system can be an IP address or a hostname After you have added
the printer you can use it as you would any other printer
The CUPS Web interface requires an X server and a Web browser Although it is a poor solution
a text Web browser such as elinks (elinks package) will work too
cups init script Run chkconfig to cause CUPS (the cupsd daemon) to start when the system goes into
multiuser mode
chkconfig cups on
Start CUPS
service cups start
Firewall A CUPS server normally uses TCP port 631 for an IPP connection and port 80 for
an LPRLPD connection If the CUPS server system accepts print jobs from remote
systems and is running a firewall you need to open one or both of these ports
PDF printer You can set up a virtual PDF printer by installing the cups-pdf package or you can
set up this printer manually
Configuring a Printer Using system-config-printerMain menu System Administration Printing (RHEL) or give the command
systemconfig-printer from a terminal emulator or Run Application window (ALT-F2)
Default printer Highlight a printer in the Printing window and select menubar Printer Set as
Default from the window menu to specify the highlighted printer as the default printer If just
one printer appears in the Printing window it is the default printer you do not have to set it up
as such
Server Settings Select menubar Server Settings from the Printing window to display the Server
Settings window The top two check boxes in this window specify whether systemconfig-
printer displays printers that are shared by other systems and whether the local system
publishes printers it shares You control whether a specific printer is shared from the Policies
selection of the Printer Properties window (next)
Configuration Selections
Select menubar Printer Properties to display the Printer Properties window
This section describes the six selections found in the frame at the left side of the
Printer Properties window These selections allow you to configure the printer you
chose in the Printing window
The text boxes labeled Description and Location hold information that can help users identify
The printer The system does not use this information change it as you like For example
it might be helpful to put the physical location of the printer such as Samrsquos Office in the text
box labeled Location The text boxes labeled Device URI and Make and Model specify the
location of the printer on the computer or network and type of the printer
Policies The Policies selection enables you to control printer state sharing and banners
Under the word State are check boxes labeled Enabled Accepting jobs and Shared
Putting a tick in the check box labeled Shared shares the printer with other systems if the
local system publishes shared printers (see ldquoServer Settingsrdquo) The Policies tab also controls
whether the printer prints banners before and after jobs and what CUPS does when the printer
reports an error
Access Control The Access Control selection enables you to set the policy for printer access By
default anyone can use the printer To restrict access you can create a blacklist of
users who are not allowed to use it Alternatively you can prohibit anyone from
using the printer and then create a whitelist of users who are allowed to use it
Printer Options The Printer Options selection controls image quality paper size and source
(tray) and other generic printer options
Setting Up a Local or Remote PrinterThis section describes how to set up three types of printers for local use a printer
attached to the local system a printer hosted by another system and a printer that
resides on the local network (a network printer)
The system-config-printer utility looks for printers attached to the system or the local network It
then asks if you want to adjust the firewall so the local system can detect printers on the
network (Fedora only) and displays the New Printer window
Specifying a URI The easiest way to locate a remote printer that is not listed is to select Find
Network Printer under Network Printer in the frame labeled Select Device Then enter in the
text box labeled Host the name of the host the printer is attached to (the server) or
for a network printer the name of the printer You can specify an IP address instead of
a hostname
Click Find If it finds a printer system-config-printer displays the name of
the printer under Network Printer and fills in information about the printer on the
right side of the window
If the printer is not listed select Other (for a local printer) or one of the selections
under Network Printer (for a remote printer) from the frame labeled Select Device
system-config-printer displays appropriate text boxes on the right side of the window
All selections under Network Printer require you to specify a Host and a Queue or
Port number These values locate the printer on the network
To specify the queue for an LPDLPR printer use the form printer-name for an IPP
printer use the form printersprinter-name for an HP JetDirect-compatible network
printer specify the printer-name and Port number Replace printer-name with the
name of the printer on the server
If you are unsure of the name of a printer give the command lpstat ndashp on the server to
display the names of all printers on that system After selecting or specifying a printer
click the button labeled Verify (if present) to make sure the printer is accessible and
then click Forward The system-config-printer utility searches for the printer driver
At this point the system-config-printer utility closes the New Printer window asks if
you want to print a test page and displays the new printer in the Printing window
If you have more than one print queue and want to set up the new print queue to be
the default highlight the printer and select menubar Printer Set As Default
Sharing CUPS PrintersDisplay the Server Settings window by selecting menubar Server Settings and put a tick in the
Check box labeled Publish shared printers connected to this system Using this technique
allows you to chose whether to share each printer
IPP facilitates remote printing The Listen directive in the CUPS configuration file
etccupscupsdconf specifies which IP address and port or which domain socket path
CUPS binds to and accepts requests on The Listen directive has the following format
Listen IPport | path
where IP is the IP address that CUPS accepts connections on port is the port number
that CUPS listens on for connections on IP and path is the pathname of the domain
socket CUPS uses to communicate with printers CUPS typically uses port 631 and by
default binds to localhost Thus it accepts connections from the loopback service of
the local system only CUPS uses varruncupscupssock a local domain socket to
communicate with local printers It can also use a Port directive to specify the port
number it listens to for HTTP requests
$ grep -i listen etccupscupsdconf
Only listen for connections from the local machine
Listen localhost631
Listen varruncupscupssock
To allow other systems to connect to the CUPS server on the local system you must
instruct CUPS to bind to an IP address that the other systems can reach First
remove or comment out the Listen localhost631 directive leave the other Listen
directive in place
Listen localhost631
Listen varruncupscupssock
In place of the commented-out Listen directive use an access control list to permit
only selected machines to connect to local printers An access control list is
defined inside a ltLocationgt container (see page 934 for the Apache equivalent)
The following example allows only the system at IP address 1921681101 and
the local system to print to the specified printer
ltLocation gt
Order AllowDeny
Allow access from the local system and 1921681101
Allow from localhost
Allow from 1921681101
Uncomment the following line to permit access from all systems
Allow LOCAL
ltLocationgt
The LOCAL macro is internal to CUPS and specifies the local system This macro
accepts communication from any address that resolves to the local system Specify
Allow LOCAL to share the printer with all systems
Print from WindowsPrint Using CUPS
Modern versions of Windows (2000 and later) support IPP and as a result can communicate
directly with CUPS To use this feature you must have CUPS configured on
the Linux print server to allow remote IPP printing you also need to create a new
printer on the Windows system that points to the IP address of the Linux print server
First set up the etccupscupsdconf file to allow network printing from a client as
explained in ldquoSharing CUPS Printersrdquo
Windows XP From Windows XP go to Control Panel1048644Printers and Faxes and click Add Printer
Click Next in the introductory window and select A network printer or a printer
attached to another computer Click Next Select Connect to a printer on the Internet
or on a home or office network Continue following the next paragraph at
ldquoEnter URLrdquo
Windows 7 From Windows 7 go to Control Panel1048644Devices and Printers and click Add a
printer Click Add a network wireless or Bluetooth printer Assuming Windows
does not find the printer click The printer that I want isnrsquot listed Click the radio
button labeled Select a shared printer by name
Enter URL Enter the following information in the text box (under Windows XP it is labeled URL)
httphostname631printersprinter-name
where hostname is the name or IP address of the Linux CUPS server system and
printer-name is the name of the printer on that system For example for the printer
named dog88 on the system named dog at IP address 192168012 you could enter
httpdog631printersdog88 or http192168012631printersdog88 If you
use a hostname it must be defined in the hosts file on the Windows machine Click
Next Windows requests that you specify the manufacturer and model of printer or
provide a driver for the printer If you supply a printer driver use the Windows version
of the driver
Print Using SambaSamba must be set up so that the Windows user who will be printing is mapped to a
Linux user (including mapping the Windows guest user to the Linux user nobody)
Windows supports printer sharing via SMB which allows a printer to be shared
transparently between Windows systems using the same mechanism as file sharing
Samba allows Windows users to use printers connected to Linux systems just as
they would use any other shared printers
When you use rpm to install Samba it creates a directory named varspoolsamba
that is owned by the root account and that anyone can read from and write to
$ ls -ld varspoolsamba
drwxrwxrwt 2 root root 4096 02-03 1523 varspoolsamba
Under Fedora put the following two lines in the [global] section of the etcsambasmbconf
file Under RHEL these lines are set up by default you need only change the printcap name as
shown
[global]
printing = cups
printcap name = cups
The printerrsquos share is listed in the [printers] section in smbconf In the following
example the path is the path Samba uses as a spool directory and is not a normal
share path The settings allow anyone including guest to use the printer The
[printers] section in the default smbconf file has the following entries which are
appropriate for most setups
[printers]
comment = All Printers
path = varspoolsamba
browseable = no
guest ok = no
writable = no
printable = yes
Printing to WindowsCUPS views a printer on a Windows machine exactly the same way it views any
other printer The only difference is the URI you need to specify when connecting it
To configure a printer connected to a Windows machine click the Administration
tab in the CUPS Web interface and select Add Printer just as you would for a local
printer
When you are asked to select the device choose Windows Printer via SAMBA
Enter the URI of the printer in the following format
smbwindows_systemprinter_name
where windows_system can be an IP address or a hostname After you have added
the printer you can use it as you would any other printer
Firewall A CUPS server normally uses TCP port 631 for an IPP connection and port 80 for
an LPRLPD connection If the CUPS server system accepts print jobs from remote
systems and is running a firewall you need to open one or both of these ports
PDF printer You can set up a virtual PDF printer by installing the cups-pdf package or you can
set up this printer manually
Configuring a Printer Using system-config-printerMain menu System Administration Printing (RHEL) or give the command
systemconfig-printer from a terminal emulator or Run Application window (ALT-F2)
Default printer Highlight a printer in the Printing window and select menubar Printer Set as
Default from the window menu to specify the highlighted printer as the default printer If just
one printer appears in the Printing window it is the default printer you do not have to set it up
as such
Server Settings Select menubar Server Settings from the Printing window to display the Server
Settings window The top two check boxes in this window specify whether systemconfig-
printer displays printers that are shared by other systems and whether the local system
publishes printers it shares You control whether a specific printer is shared from the Policies
selection of the Printer Properties window (next)
Configuration Selections
Select menubar Printer Properties to display the Printer Properties window
This section describes the six selections found in the frame at the left side of the
Printer Properties window These selections allow you to configure the printer you
chose in the Printing window
The text boxes labeled Description and Location hold information that can help users identify
The printer The system does not use this information change it as you like For example
it might be helpful to put the physical location of the printer such as Samrsquos Office in the text
box labeled Location The text boxes labeled Device URI and Make and Model specify the
location of the printer on the computer or network and type of the printer
Policies The Policies selection enables you to control printer state sharing and banners
Under the word State are check boxes labeled Enabled Accepting jobs and Shared
Putting a tick in the check box labeled Shared shares the printer with other systems if the
local system publishes shared printers (see ldquoServer Settingsrdquo) The Policies tab also controls
whether the printer prints banners before and after jobs and what CUPS does when the printer
reports an error
Access Control The Access Control selection enables you to set the policy for printer access By
default anyone can use the printer To restrict access you can create a blacklist of
users who are not allowed to use it Alternatively you can prohibit anyone from
using the printer and then create a whitelist of users who are allowed to use it
Printer Options The Printer Options selection controls image quality paper size and source
(tray) and other generic printer options
Setting Up a Local or Remote PrinterThis section describes how to set up three types of printers for local use a printer
attached to the local system a printer hosted by another system and a printer that
resides on the local network (a network printer)
The system-config-printer utility looks for printers attached to the system or the local network It
then asks if you want to adjust the firewall so the local system can detect printers on the
network (Fedora only) and displays the New Printer window
Specifying a URI The easiest way to locate a remote printer that is not listed is to select Find
Network Printer under Network Printer in the frame labeled Select Device Then enter in the
text box labeled Host the name of the host the printer is attached to (the server) or
for a network printer the name of the printer You can specify an IP address instead of
a hostname
Click Find If it finds a printer system-config-printer displays the name of
the printer under Network Printer and fills in information about the printer on the
right side of the window
If the printer is not listed select Other (for a local printer) or one of the selections
under Network Printer (for a remote printer) from the frame labeled Select Device
system-config-printer displays appropriate text boxes on the right side of the window
All selections under Network Printer require you to specify a Host and a Queue or
Port number These values locate the printer on the network
To specify the queue for an LPDLPR printer use the form printer-name for an IPP
printer use the form printersprinter-name for an HP JetDirect-compatible network
printer specify the printer-name and Port number Replace printer-name with the
name of the printer on the server
If you are unsure of the name of a printer give the command lpstat ndashp on the server to
display the names of all printers on that system After selecting or specifying a printer
click the button labeled Verify (if present) to make sure the printer is accessible and
then click Forward The system-config-printer utility searches for the printer driver
At this point the system-config-printer utility closes the New Printer window asks if
you want to print a test page and displays the new printer in the Printing window
If you have more than one print queue and want to set up the new print queue to be
the default highlight the printer and select menubar Printer Set As Default
Sharing CUPS PrintersDisplay the Server Settings window by selecting menubar Server Settings and put a tick in the
Check box labeled Publish shared printers connected to this system Using this technique
allows you to chose whether to share each printer
IPP facilitates remote printing The Listen directive in the CUPS configuration file
etccupscupsdconf specifies which IP address and port or which domain socket path
CUPS binds to and accepts requests on The Listen directive has the following format
Listen IPport | path
where IP is the IP address that CUPS accepts connections on port is the port number
that CUPS listens on for connections on IP and path is the pathname of the domain
socket CUPS uses to communicate with printers CUPS typically uses port 631 and by
default binds to localhost Thus it accepts connections from the loopback service of
the local system only CUPS uses varruncupscupssock a local domain socket to
communicate with local printers It can also use a Port directive to specify the port
number it listens to for HTTP requests
$ grep -i listen etccupscupsdconf
Only listen for connections from the local machine
Listen localhost631
Listen varruncupscupssock
To allow other systems to connect to the CUPS server on the local system you must
instruct CUPS to bind to an IP address that the other systems can reach First
remove or comment out the Listen localhost631 directive leave the other Listen
directive in place
Listen localhost631
Listen varruncupscupssock
In place of the commented-out Listen directive use an access control list to permit
only selected machines to connect to local printers An access control list is
defined inside a ltLocationgt container (see page 934 for the Apache equivalent)
The following example allows only the system at IP address 1921681101 and
the local system to print to the specified printer
ltLocation gt
Order AllowDeny
Allow access from the local system and 1921681101
Allow from localhost
Allow from 1921681101
Uncomment the following line to permit access from all systems
Allow LOCAL
ltLocationgt
The LOCAL macro is internal to CUPS and specifies the local system This macro
accepts communication from any address that resolves to the local system Specify
Allow LOCAL to share the printer with all systems
Print from WindowsPrint Using CUPS
Modern versions of Windows (2000 and later) support IPP and as a result can communicate
directly with CUPS To use this feature you must have CUPS configured on
the Linux print server to allow remote IPP printing you also need to create a new
printer on the Windows system that points to the IP address of the Linux print server
First set up the etccupscupsdconf file to allow network printing from a client as
explained in ldquoSharing CUPS Printersrdquo
Windows XP From Windows XP go to Control Panel1048644Printers and Faxes and click Add Printer
Click Next in the introductory window and select A network printer or a printer
attached to another computer Click Next Select Connect to a printer on the Internet
or on a home or office network Continue following the next paragraph at
ldquoEnter URLrdquo
Windows 7 From Windows 7 go to Control Panel1048644Devices and Printers and click Add a
printer Click Add a network wireless or Bluetooth printer Assuming Windows
does not find the printer click The printer that I want isnrsquot listed Click the radio
button labeled Select a shared printer by name
Enter URL Enter the following information in the text box (under Windows XP it is labeled URL)
httphostname631printersprinter-name
where hostname is the name or IP address of the Linux CUPS server system and
printer-name is the name of the printer on that system For example for the printer
named dog88 on the system named dog at IP address 192168012 you could enter
httpdog631printersdog88 or http192168012631printersdog88 If you
use a hostname it must be defined in the hosts file on the Windows machine Click
Next Windows requests that you specify the manufacturer and model of printer or
provide a driver for the printer If you supply a printer driver use the Windows version
of the driver
Print Using SambaSamba must be set up so that the Windows user who will be printing is mapped to a
Linux user (including mapping the Windows guest user to the Linux user nobody)
Windows supports printer sharing via SMB which allows a printer to be shared
transparently between Windows systems using the same mechanism as file sharing
Samba allows Windows users to use printers connected to Linux systems just as
they would use any other shared printers
When you use rpm to install Samba it creates a directory named varspoolsamba
that is owned by the root account and that anyone can read from and write to
$ ls -ld varspoolsamba
drwxrwxrwt 2 root root 4096 02-03 1523 varspoolsamba
Under Fedora put the following two lines in the [global] section of the etcsambasmbconf
file Under RHEL these lines are set up by default you need only change the printcap name as
shown
[global]
printing = cups
printcap name = cups
The printerrsquos share is listed in the [printers] section in smbconf In the following
example the path is the path Samba uses as a spool directory and is not a normal
share path The settings allow anyone including guest to use the printer The
[printers] section in the default smbconf file has the following entries which are
appropriate for most setups
[printers]
comment = All Printers
path = varspoolsamba
browseable = no
guest ok = no
writable = no
printable = yes
Printing to WindowsCUPS views a printer on a Windows machine exactly the same way it views any
other printer The only difference is the URI you need to specify when connecting it
To configure a printer connected to a Windows machine click the Administration
tab in the CUPS Web interface and select Add Printer just as you would for a local
printer
When you are asked to select the device choose Windows Printer via SAMBA
Enter the URI of the printer in the following format
smbwindows_systemprinter_name
where windows_system can be an IP address or a hostname After you have added
the printer you can use it as you would any other printer
Configuring a Printer Using system-config-printerMain menu System Administration Printing (RHEL) or give the command
systemconfig-printer from a terminal emulator or Run Application window (ALT-F2)
Default printer Highlight a printer in the Printing window and select menubar Printer Set as
Default from the window menu to specify the highlighted printer as the default printer If just
one printer appears in the Printing window it is the default printer you do not have to set it up
as such
Server Settings Select menubar Server Settings from the Printing window to display the Server
Settings window The top two check boxes in this window specify whether systemconfig-
printer displays printers that are shared by other systems and whether the local system
publishes printers it shares You control whether a specific printer is shared from the Policies
selection of the Printer Properties window (next)
Configuration Selections
Select menubar Printer Properties to display the Printer Properties window
This section describes the six selections found in the frame at the left side of the
Printer Properties window These selections allow you to configure the printer you
chose in the Printing window
The text boxes labeled Description and Location hold information that can help users identify
The printer The system does not use this information change it as you like For example
it might be helpful to put the physical location of the printer such as Samrsquos Office in the text
box labeled Location The text boxes labeled Device URI and Make and Model specify the
location of the printer on the computer or network and type of the printer
Policies The Policies selection enables you to control printer state sharing and banners
Under the word State are check boxes labeled Enabled Accepting jobs and Shared
Putting a tick in the check box labeled Shared shares the printer with other systems if the
local system publishes shared printers (see ldquoServer Settingsrdquo) The Policies tab also controls
whether the printer prints banners before and after jobs and what CUPS does when the printer
reports an error
Access Control The Access Control selection enables you to set the policy for printer access By
default anyone can use the printer To restrict access you can create a blacklist of
users who are not allowed to use it Alternatively you can prohibit anyone from
using the printer and then create a whitelist of users who are allowed to use it
Printer Options The Printer Options selection controls image quality paper size and source
(tray) and other generic printer options
Setting Up a Local or Remote PrinterThis section describes how to set up three types of printers for local use a printer
attached to the local system a printer hosted by another system and a printer that
resides on the local network (a network printer)
The system-config-printer utility looks for printers attached to the system or the local network It
then asks if you want to adjust the firewall so the local system can detect printers on the
network (Fedora only) and displays the New Printer window
Specifying a URI The easiest way to locate a remote printer that is not listed is to select Find
Network Printer under Network Printer in the frame labeled Select Device Then enter in the
text box labeled Host the name of the host the printer is attached to (the server) or
for a network printer the name of the printer You can specify an IP address instead of
a hostname
Click Find If it finds a printer system-config-printer displays the name of
the printer under Network Printer and fills in information about the printer on the
right side of the window
If the printer is not listed select Other (for a local printer) or one of the selections
under Network Printer (for a remote printer) from the frame labeled Select Device
system-config-printer displays appropriate text boxes on the right side of the window
All selections under Network Printer require you to specify a Host and a Queue or
Port number These values locate the printer on the network
To specify the queue for an LPDLPR printer use the form printer-name for an IPP
printer use the form printersprinter-name for an HP JetDirect-compatible network
printer specify the printer-name and Port number Replace printer-name with the
name of the printer on the server
If you are unsure of the name of a printer give the command lpstat ndashp on the server to
display the names of all printers on that system After selecting or specifying a printer
click the button labeled Verify (if present) to make sure the printer is accessible and
then click Forward The system-config-printer utility searches for the printer driver
At this point the system-config-printer utility closes the New Printer window asks if
you want to print a test page and displays the new printer in the Printing window
If you have more than one print queue and want to set up the new print queue to be
the default highlight the printer and select menubar Printer Set As Default
Sharing CUPS PrintersDisplay the Server Settings window by selecting menubar Server Settings and put a tick in the
Check box labeled Publish shared printers connected to this system Using this technique
allows you to chose whether to share each printer
IPP facilitates remote printing The Listen directive in the CUPS configuration file
etccupscupsdconf specifies which IP address and port or which domain socket path
CUPS binds to and accepts requests on The Listen directive has the following format
Listen IPport | path
where IP is the IP address that CUPS accepts connections on port is the port number
that CUPS listens on for connections on IP and path is the pathname of the domain
socket CUPS uses to communicate with printers CUPS typically uses port 631 and by
default binds to localhost Thus it accepts connections from the loopback service of
the local system only CUPS uses varruncupscupssock a local domain socket to
communicate with local printers It can also use a Port directive to specify the port
number it listens to for HTTP requests
$ grep -i listen etccupscupsdconf
Only listen for connections from the local machine
Listen localhost631
Listen varruncupscupssock
To allow other systems to connect to the CUPS server on the local system you must
instruct CUPS to bind to an IP address that the other systems can reach First
remove or comment out the Listen localhost631 directive leave the other Listen
directive in place
Listen localhost631
Listen varruncupscupssock
In place of the commented-out Listen directive use an access control list to permit
only selected machines to connect to local printers An access control list is
defined inside a ltLocationgt container (see page 934 for the Apache equivalent)
The following example allows only the system at IP address 1921681101 and
the local system to print to the specified printer
ltLocation gt
Order AllowDeny
Allow access from the local system and 1921681101
Allow from localhost
Allow from 1921681101
Uncomment the following line to permit access from all systems
Allow LOCAL
ltLocationgt
The LOCAL macro is internal to CUPS and specifies the local system This macro
accepts communication from any address that resolves to the local system Specify
Allow LOCAL to share the printer with all systems
Print from WindowsPrint Using CUPS
Modern versions of Windows (2000 and later) support IPP and as a result can communicate
directly with CUPS To use this feature you must have CUPS configured on
the Linux print server to allow remote IPP printing you also need to create a new
printer on the Windows system that points to the IP address of the Linux print server
First set up the etccupscupsdconf file to allow network printing from a client as
explained in ldquoSharing CUPS Printersrdquo
Windows XP From Windows XP go to Control Panel1048644Printers and Faxes and click Add Printer
Click Next in the introductory window and select A network printer or a printer
attached to another computer Click Next Select Connect to a printer on the Internet
or on a home or office network Continue following the next paragraph at
ldquoEnter URLrdquo
Windows 7 From Windows 7 go to Control Panel1048644Devices and Printers and click Add a
printer Click Add a network wireless or Bluetooth printer Assuming Windows
does not find the printer click The printer that I want isnrsquot listed Click the radio
button labeled Select a shared printer by name
Enter URL Enter the following information in the text box (under Windows XP it is labeled URL)
httphostname631printersprinter-name
where hostname is the name or IP address of the Linux CUPS server system and
printer-name is the name of the printer on that system For example for the printer
named dog88 on the system named dog at IP address 192168012 you could enter
httpdog631printersdog88 or http192168012631printersdog88 If you
use a hostname it must be defined in the hosts file on the Windows machine Click
Next Windows requests that you specify the manufacturer and model of printer or
provide a driver for the printer If you supply a printer driver use the Windows version
of the driver
Print Using SambaSamba must be set up so that the Windows user who will be printing is mapped to a
Linux user (including mapping the Windows guest user to the Linux user nobody)
Windows supports printer sharing via SMB which allows a printer to be shared
transparently between Windows systems using the same mechanism as file sharing
Samba allows Windows users to use printers connected to Linux systems just as
they would use any other shared printers
When you use rpm to install Samba it creates a directory named varspoolsamba
that is owned by the root account and that anyone can read from and write to
$ ls -ld varspoolsamba
drwxrwxrwt 2 root root 4096 02-03 1523 varspoolsamba
Under Fedora put the following two lines in the [global] section of the etcsambasmbconf
file Under RHEL these lines are set up by default you need only change the printcap name as
shown
[global]
printing = cups
printcap name = cups
The printerrsquos share is listed in the [printers] section in smbconf In the following
example the path is the path Samba uses as a spool directory and is not a normal
share path The settings allow anyone including guest to use the printer The
[printers] section in the default smbconf file has the following entries which are
appropriate for most setups
[printers]
comment = All Printers
path = varspoolsamba
browseable = no
guest ok = no
writable = no
printable = yes
Printing to WindowsCUPS views a printer on a Windows machine exactly the same way it views any
other printer The only difference is the URI you need to specify when connecting it
To configure a printer connected to a Windows machine click the Administration
tab in the CUPS Web interface and select Add Printer just as you would for a local
printer
When you are asked to select the device choose Windows Printer via SAMBA
Enter the URI of the printer in the following format
smbwindows_systemprinter_name
where windows_system can be an IP address or a hostname After you have added
the printer you can use it as you would any other printer
Default printer Highlight a printer in the Printing window and select menubar Printer Set as
Default from the window menu to specify the highlighted printer as the default printer If just
one printer appears in the Printing window it is the default printer you do not have to set it up
as such
Server Settings Select menubar Server Settings from the Printing window to display the Server
Settings window The top two check boxes in this window specify whether systemconfig-
printer displays printers that are shared by other systems and whether the local system
publishes printers it shares You control whether a specific printer is shared from the Policies
selection of the Printer Properties window (next)
Configuration Selections
Select menubar Printer Properties to display the Printer Properties window
This section describes the six selections found in the frame at the left side of the
Printer Properties window These selections allow you to configure the printer you
chose in the Printing window
The text boxes labeled Description and Location hold information that can help users identify
The printer The system does not use this information change it as you like For example
it might be helpful to put the physical location of the printer such as Samrsquos Office in the text
box labeled Location The text boxes labeled Device URI and Make and Model specify the
location of the printer on the computer or network and type of the printer
Policies The Policies selection enables you to control printer state sharing and banners
Under the word State are check boxes labeled Enabled Accepting jobs and Shared
Putting a tick in the check box labeled Shared shares the printer with other systems if the
local system publishes shared printers (see ldquoServer Settingsrdquo) The Policies tab also controls
whether the printer prints banners before and after jobs and what CUPS does when the printer
reports an error
Access Control The Access Control selection enables you to set the policy for printer access By
default anyone can use the printer To restrict access you can create a blacklist of
users who are not allowed to use it Alternatively you can prohibit anyone from
using the printer and then create a whitelist of users who are allowed to use it
Printer Options The Printer Options selection controls image quality paper size and source
(tray) and other generic printer options
Setting Up a Local or Remote PrinterThis section describes how to set up three types of printers for local use a printer
attached to the local system a printer hosted by another system and a printer that
resides on the local network (a network printer)
The system-config-printer utility looks for printers attached to the system or the local network It
then asks if you want to adjust the firewall so the local system can detect printers on the
network (Fedora only) and displays the New Printer window
Specifying a URI The easiest way to locate a remote printer that is not listed is to select Find
Network Printer under Network Printer in the frame labeled Select Device Then enter in the
text box labeled Host the name of the host the printer is attached to (the server) or
for a network printer the name of the printer You can specify an IP address instead of
a hostname
Click Find If it finds a printer system-config-printer displays the name of
the printer under Network Printer and fills in information about the printer on the
right side of the window
If the printer is not listed select Other (for a local printer) or one of the selections
under Network Printer (for a remote printer) from the frame labeled Select Device
system-config-printer displays appropriate text boxes on the right side of the window
All selections under Network Printer require you to specify a Host and a Queue or
Port number These values locate the printer on the network
To specify the queue for an LPDLPR printer use the form printer-name for an IPP
printer use the form printersprinter-name for an HP JetDirect-compatible network
printer specify the printer-name and Port number Replace printer-name with the
name of the printer on the server
If you are unsure of the name of a printer give the command lpstat ndashp on the server to
display the names of all printers on that system After selecting or specifying a printer
click the button labeled Verify (if present) to make sure the printer is accessible and
then click Forward The system-config-printer utility searches for the printer driver
At this point the system-config-printer utility closes the New Printer window asks if
you want to print a test page and displays the new printer in the Printing window
If you have more than one print queue and want to set up the new print queue to be
the default highlight the printer and select menubar Printer Set As Default
Sharing CUPS PrintersDisplay the Server Settings window by selecting menubar Server Settings and put a tick in the
Check box labeled Publish shared printers connected to this system Using this technique
allows you to chose whether to share each printer
IPP facilitates remote printing The Listen directive in the CUPS configuration file
etccupscupsdconf specifies which IP address and port or which domain socket path
CUPS binds to and accepts requests on The Listen directive has the following format
Listen IPport | path
where IP is the IP address that CUPS accepts connections on port is the port number
that CUPS listens on for connections on IP and path is the pathname of the domain
socket CUPS uses to communicate with printers CUPS typically uses port 631 and by
default binds to localhost Thus it accepts connections from the loopback service of
the local system only CUPS uses varruncupscupssock a local domain socket to
communicate with local printers It can also use a Port directive to specify the port
number it listens to for HTTP requests
$ grep -i listen etccupscupsdconf
Only listen for connections from the local machine
Listen localhost631
Listen varruncupscupssock
To allow other systems to connect to the CUPS server on the local system you must
instruct CUPS to bind to an IP address that the other systems can reach First
remove or comment out the Listen localhost631 directive leave the other Listen
directive in place
Listen localhost631
Listen varruncupscupssock
In place of the commented-out Listen directive use an access control list to permit
only selected machines to connect to local printers An access control list is
defined inside a ltLocationgt container (see page 934 for the Apache equivalent)
The following example allows only the system at IP address 1921681101 and
the local system to print to the specified printer
ltLocation gt
Order AllowDeny
Allow access from the local system and 1921681101
Allow from localhost
Allow from 1921681101
Uncomment the following line to permit access from all systems
Allow LOCAL
ltLocationgt
The LOCAL macro is internal to CUPS and specifies the local system This macro
accepts communication from any address that resolves to the local system Specify
Allow LOCAL to share the printer with all systems
Print from WindowsPrint Using CUPS
Modern versions of Windows (2000 and later) support IPP and as a result can communicate
directly with CUPS To use this feature you must have CUPS configured on
the Linux print server to allow remote IPP printing you also need to create a new
printer on the Windows system that points to the IP address of the Linux print server
First set up the etccupscupsdconf file to allow network printing from a client as
explained in ldquoSharing CUPS Printersrdquo
Windows XP From Windows XP go to Control Panel1048644Printers and Faxes and click Add Printer
Click Next in the introductory window and select A network printer or a printer
attached to another computer Click Next Select Connect to a printer on the Internet
or on a home or office network Continue following the next paragraph at
ldquoEnter URLrdquo
Windows 7 From Windows 7 go to Control Panel1048644Devices and Printers and click Add a
printer Click Add a network wireless or Bluetooth printer Assuming Windows
does not find the printer click The printer that I want isnrsquot listed Click the radio
button labeled Select a shared printer by name
Enter URL Enter the following information in the text box (under Windows XP it is labeled URL)
httphostname631printersprinter-name
where hostname is the name or IP address of the Linux CUPS server system and
printer-name is the name of the printer on that system For example for the printer
named dog88 on the system named dog at IP address 192168012 you could enter
httpdog631printersdog88 or http192168012631printersdog88 If you
use a hostname it must be defined in the hosts file on the Windows machine Click
Next Windows requests that you specify the manufacturer and model of printer or
provide a driver for the printer If you supply a printer driver use the Windows version
of the driver
Print Using SambaSamba must be set up so that the Windows user who will be printing is mapped to a
Linux user (including mapping the Windows guest user to the Linux user nobody)
Windows supports printer sharing via SMB which allows a printer to be shared
transparently between Windows systems using the same mechanism as file sharing
Samba allows Windows users to use printers connected to Linux systems just as
they would use any other shared printers
When you use rpm to install Samba it creates a directory named varspoolsamba
that is owned by the root account and that anyone can read from and write to
$ ls -ld varspoolsamba
drwxrwxrwt 2 root root 4096 02-03 1523 varspoolsamba
Under Fedora put the following two lines in the [global] section of the etcsambasmbconf
file Under RHEL these lines are set up by default you need only change the printcap name as
shown
[global]
printing = cups
printcap name = cups
The printerrsquos share is listed in the [printers] section in smbconf In the following
example the path is the path Samba uses as a spool directory and is not a normal
share path The settings allow anyone including guest to use the printer The
[printers] section in the default smbconf file has the following entries which are
appropriate for most setups
[printers]
comment = All Printers
path = varspoolsamba
browseable = no
guest ok = no
writable = no
printable = yes
Printing to WindowsCUPS views a printer on a Windows machine exactly the same way it views any
other printer The only difference is the URI you need to specify when connecting it
To configure a printer connected to a Windows machine click the Administration
tab in the CUPS Web interface and select Add Printer just as you would for a local
printer
When you are asked to select the device choose Windows Printer via SAMBA
Enter the URI of the printer in the following format
smbwindows_systemprinter_name
where windows_system can be an IP address or a hostname After you have added
the printer you can use it as you would any other printer
Configuration Selections
Select menubar Printer Properties to display the Printer Properties window
This section describes the six selections found in the frame at the left side of the
Printer Properties window These selections allow you to configure the printer you
chose in the Printing window
The text boxes labeled Description and Location hold information that can help users identify
The printer The system does not use this information change it as you like For example
it might be helpful to put the physical location of the printer such as Samrsquos Office in the text
box labeled Location The text boxes labeled Device URI and Make and Model specify the
location of the printer on the computer or network and type of the printer
Policies The Policies selection enables you to control printer state sharing and banners
Under the word State are check boxes labeled Enabled Accepting jobs and Shared
Putting a tick in the check box labeled Shared shares the printer with other systems if the
local system publishes shared printers (see ldquoServer Settingsrdquo) The Policies tab also controls
whether the printer prints banners before and after jobs and what CUPS does when the printer
reports an error
Access Control The Access Control selection enables you to set the policy for printer access By
default anyone can use the printer To restrict access you can create a blacklist of
users who are not allowed to use it Alternatively you can prohibit anyone from
using the printer and then create a whitelist of users who are allowed to use it
Printer Options The Printer Options selection controls image quality paper size and source
(tray) and other generic printer options
Setting Up a Local or Remote PrinterThis section describes how to set up three types of printers for local use a printer
attached to the local system a printer hosted by another system and a printer that
resides on the local network (a network printer)
The system-config-printer utility looks for printers attached to the system or the local network It
then asks if you want to adjust the firewall so the local system can detect printers on the
network (Fedora only) and displays the New Printer window
Specifying a URI The easiest way to locate a remote printer that is not listed is to select Find
Network Printer under Network Printer in the frame labeled Select Device Then enter in the
text box labeled Host the name of the host the printer is attached to (the server) or
for a network printer the name of the printer You can specify an IP address instead of
a hostname
Click Find If it finds a printer system-config-printer displays the name of
the printer under Network Printer and fills in information about the printer on the
right side of the window
If the printer is not listed select Other (for a local printer) or one of the selections
under Network Printer (for a remote printer) from the frame labeled Select Device
system-config-printer displays appropriate text boxes on the right side of the window
All selections under Network Printer require you to specify a Host and a Queue or
Port number These values locate the printer on the network
To specify the queue for an LPDLPR printer use the form printer-name for an IPP
printer use the form printersprinter-name for an HP JetDirect-compatible network
printer specify the printer-name and Port number Replace printer-name with the
name of the printer on the server
If you are unsure of the name of a printer give the command lpstat ndashp on the server to
display the names of all printers on that system After selecting or specifying a printer
click the button labeled Verify (if present) to make sure the printer is accessible and
then click Forward The system-config-printer utility searches for the printer driver
At this point the system-config-printer utility closes the New Printer window asks if
you want to print a test page and displays the new printer in the Printing window
If you have more than one print queue and want to set up the new print queue to be
the default highlight the printer and select menubar Printer Set As Default
Sharing CUPS PrintersDisplay the Server Settings window by selecting menubar Server Settings and put a tick in the
Check box labeled Publish shared printers connected to this system Using this technique
allows you to chose whether to share each printer
IPP facilitates remote printing The Listen directive in the CUPS configuration file
etccupscupsdconf specifies which IP address and port or which domain socket path
CUPS binds to and accepts requests on The Listen directive has the following format
Listen IPport | path
where IP is the IP address that CUPS accepts connections on port is the port number
that CUPS listens on for connections on IP and path is the pathname of the domain
socket CUPS uses to communicate with printers CUPS typically uses port 631 and by
default binds to localhost Thus it accepts connections from the loopback service of
the local system only CUPS uses varruncupscupssock a local domain socket to
communicate with local printers It can also use a Port directive to specify the port
number it listens to for HTTP requests
$ grep -i listen etccupscupsdconf
Only listen for connections from the local machine
Listen localhost631
Listen varruncupscupssock
To allow other systems to connect to the CUPS server on the local system you must
instruct CUPS to bind to an IP address that the other systems can reach First
remove or comment out the Listen localhost631 directive leave the other Listen
directive in place
Listen localhost631
Listen varruncupscupssock
In place of the commented-out Listen directive use an access control list to permit
only selected machines to connect to local printers An access control list is
defined inside a ltLocationgt container (see page 934 for the Apache equivalent)
The following example allows only the system at IP address 1921681101 and
the local system to print to the specified printer
ltLocation gt
Order AllowDeny
Allow access from the local system and 1921681101
Allow from localhost
Allow from 1921681101
Uncomment the following line to permit access from all systems
Allow LOCAL
ltLocationgt
The LOCAL macro is internal to CUPS and specifies the local system This macro
accepts communication from any address that resolves to the local system Specify
Allow LOCAL to share the printer with all systems
Print from WindowsPrint Using CUPS
Modern versions of Windows (2000 and later) support IPP and as a result can communicate
directly with CUPS To use this feature you must have CUPS configured on
the Linux print server to allow remote IPP printing you also need to create a new
printer on the Windows system that points to the IP address of the Linux print server
First set up the etccupscupsdconf file to allow network printing from a client as
explained in ldquoSharing CUPS Printersrdquo
Windows XP From Windows XP go to Control Panel1048644Printers and Faxes and click Add Printer
Click Next in the introductory window and select A network printer or a printer
attached to another computer Click Next Select Connect to a printer on the Internet
or on a home or office network Continue following the next paragraph at
ldquoEnter URLrdquo
Windows 7 From Windows 7 go to Control Panel1048644Devices and Printers and click Add a
printer Click Add a network wireless or Bluetooth printer Assuming Windows
does not find the printer click The printer that I want isnrsquot listed Click the radio
button labeled Select a shared printer by name
Enter URL Enter the following information in the text box (under Windows XP it is labeled URL)
httphostname631printersprinter-name
where hostname is the name or IP address of the Linux CUPS server system and
printer-name is the name of the printer on that system For example for the printer
named dog88 on the system named dog at IP address 192168012 you could enter
httpdog631printersdog88 or http192168012631printersdog88 If you
use a hostname it must be defined in the hosts file on the Windows machine Click
Next Windows requests that you specify the manufacturer and model of printer or
provide a driver for the printer If you supply a printer driver use the Windows version
of the driver
Print Using SambaSamba must be set up so that the Windows user who will be printing is mapped to a
Linux user (including mapping the Windows guest user to the Linux user nobody)
Windows supports printer sharing via SMB which allows a printer to be shared
transparently between Windows systems using the same mechanism as file sharing
Samba allows Windows users to use printers connected to Linux systems just as
they would use any other shared printers
When you use rpm to install Samba it creates a directory named varspoolsamba
that is owned by the root account and that anyone can read from and write to
$ ls -ld varspoolsamba
drwxrwxrwt 2 root root 4096 02-03 1523 varspoolsamba
Under Fedora put the following two lines in the [global] section of the etcsambasmbconf
file Under RHEL these lines are set up by default you need only change the printcap name as
shown
[global]
printing = cups
printcap name = cups
The printerrsquos share is listed in the [printers] section in smbconf In the following
example the path is the path Samba uses as a spool directory and is not a normal
share path The settings allow anyone including guest to use the printer The
[printers] section in the default smbconf file has the following entries which are
appropriate for most setups
[printers]
comment = All Printers
path = varspoolsamba
browseable = no
guest ok = no
writable = no
printable = yes
Printing to WindowsCUPS views a printer on a Windows machine exactly the same way it views any
other printer The only difference is the URI you need to specify when connecting it
To configure a printer connected to a Windows machine click the Administration
tab in the CUPS Web interface and select Add Printer just as you would for a local
printer
When you are asked to select the device choose Windows Printer via SAMBA
Enter the URI of the printer in the following format
smbwindows_systemprinter_name
where windows_system can be an IP address or a hostname After you have added
the printer you can use it as you would any other printer
The text boxes labeled Description and Location hold information that can help users identify
The printer The system does not use this information change it as you like For example
it might be helpful to put the physical location of the printer such as Samrsquos Office in the text
box labeled Location The text boxes labeled Device URI and Make and Model specify the
location of the printer on the computer or network and type of the printer
Policies The Policies selection enables you to control printer state sharing and banners
Under the word State are check boxes labeled Enabled Accepting jobs and Shared
Putting a tick in the check box labeled Shared shares the printer with other systems if the
local system publishes shared printers (see ldquoServer Settingsrdquo) The Policies tab also controls
whether the printer prints banners before and after jobs and what CUPS does when the printer
reports an error
Access Control The Access Control selection enables you to set the policy for printer access By
default anyone can use the printer To restrict access you can create a blacklist of
users who are not allowed to use it Alternatively you can prohibit anyone from
using the printer and then create a whitelist of users who are allowed to use it
Printer Options The Printer Options selection controls image quality paper size and source
(tray) and other generic printer options
Setting Up a Local or Remote PrinterThis section describes how to set up three types of printers for local use a printer
attached to the local system a printer hosted by another system and a printer that
resides on the local network (a network printer)
The system-config-printer utility looks for printers attached to the system or the local network It
then asks if you want to adjust the firewall so the local system can detect printers on the
network (Fedora only) and displays the New Printer window
Specifying a URI The easiest way to locate a remote printer that is not listed is to select Find
Network Printer under Network Printer in the frame labeled Select Device Then enter in the
text box labeled Host the name of the host the printer is attached to (the server) or
for a network printer the name of the printer You can specify an IP address instead of
a hostname
Click Find If it finds a printer system-config-printer displays the name of
the printer under Network Printer and fills in information about the printer on the
right side of the window
If the printer is not listed select Other (for a local printer) or one of the selections
under Network Printer (for a remote printer) from the frame labeled Select Device
system-config-printer displays appropriate text boxes on the right side of the window
All selections under Network Printer require you to specify a Host and a Queue or
Port number These values locate the printer on the network
To specify the queue for an LPDLPR printer use the form printer-name for an IPP
printer use the form printersprinter-name for an HP JetDirect-compatible network
printer specify the printer-name and Port number Replace printer-name with the
name of the printer on the server
If you are unsure of the name of a printer give the command lpstat ndashp on the server to
display the names of all printers on that system After selecting or specifying a printer
click the button labeled Verify (if present) to make sure the printer is accessible and
then click Forward The system-config-printer utility searches for the printer driver
At this point the system-config-printer utility closes the New Printer window asks if
you want to print a test page and displays the new printer in the Printing window
If you have more than one print queue and want to set up the new print queue to be
the default highlight the printer and select menubar Printer Set As Default
Sharing CUPS PrintersDisplay the Server Settings window by selecting menubar Server Settings and put a tick in the
Check box labeled Publish shared printers connected to this system Using this technique
allows you to chose whether to share each printer
IPP facilitates remote printing The Listen directive in the CUPS configuration file
etccupscupsdconf specifies which IP address and port or which domain socket path
CUPS binds to and accepts requests on The Listen directive has the following format
Listen IPport | path
where IP is the IP address that CUPS accepts connections on port is the port number
that CUPS listens on for connections on IP and path is the pathname of the domain
socket CUPS uses to communicate with printers CUPS typically uses port 631 and by
default binds to localhost Thus it accepts connections from the loopback service of
the local system only CUPS uses varruncupscupssock a local domain socket to
communicate with local printers It can also use a Port directive to specify the port
number it listens to for HTTP requests
$ grep -i listen etccupscupsdconf
Only listen for connections from the local machine
Listen localhost631
Listen varruncupscupssock
To allow other systems to connect to the CUPS server on the local system you must
instruct CUPS to bind to an IP address that the other systems can reach First
remove or comment out the Listen localhost631 directive leave the other Listen
directive in place
Listen localhost631
Listen varruncupscupssock
In place of the commented-out Listen directive use an access control list to permit
only selected machines to connect to local printers An access control list is
defined inside a ltLocationgt container (see page 934 for the Apache equivalent)
The following example allows only the system at IP address 1921681101 and
the local system to print to the specified printer
ltLocation gt
Order AllowDeny
Allow access from the local system and 1921681101
Allow from localhost
Allow from 1921681101
Uncomment the following line to permit access from all systems
Allow LOCAL
ltLocationgt
The LOCAL macro is internal to CUPS and specifies the local system This macro
accepts communication from any address that resolves to the local system Specify
Allow LOCAL to share the printer with all systems
Print from WindowsPrint Using CUPS
Modern versions of Windows (2000 and later) support IPP and as a result can communicate
directly with CUPS To use this feature you must have CUPS configured on
the Linux print server to allow remote IPP printing you also need to create a new
printer on the Windows system that points to the IP address of the Linux print server
First set up the etccupscupsdconf file to allow network printing from a client as
explained in ldquoSharing CUPS Printersrdquo
Windows XP From Windows XP go to Control Panel1048644Printers and Faxes and click Add Printer
Click Next in the introductory window and select A network printer or a printer
attached to another computer Click Next Select Connect to a printer on the Internet
or on a home or office network Continue following the next paragraph at
ldquoEnter URLrdquo
Windows 7 From Windows 7 go to Control Panel1048644Devices and Printers and click Add a
printer Click Add a network wireless or Bluetooth printer Assuming Windows
does not find the printer click The printer that I want isnrsquot listed Click the radio
button labeled Select a shared printer by name
Enter URL Enter the following information in the text box (under Windows XP it is labeled URL)
httphostname631printersprinter-name
where hostname is the name or IP address of the Linux CUPS server system and
printer-name is the name of the printer on that system For example for the printer
named dog88 on the system named dog at IP address 192168012 you could enter
httpdog631printersdog88 or http192168012631printersdog88 If you
use a hostname it must be defined in the hosts file on the Windows machine Click
Next Windows requests that you specify the manufacturer and model of printer or
provide a driver for the printer If you supply a printer driver use the Windows version
of the driver
Print Using SambaSamba must be set up so that the Windows user who will be printing is mapped to a
Linux user (including mapping the Windows guest user to the Linux user nobody)
Windows supports printer sharing via SMB which allows a printer to be shared
transparently between Windows systems using the same mechanism as file sharing
Samba allows Windows users to use printers connected to Linux systems just as
they would use any other shared printers
When you use rpm to install Samba it creates a directory named varspoolsamba
that is owned by the root account and that anyone can read from and write to
$ ls -ld varspoolsamba
drwxrwxrwt 2 root root 4096 02-03 1523 varspoolsamba
Under Fedora put the following two lines in the [global] section of the etcsambasmbconf
file Under RHEL these lines are set up by default you need only change the printcap name as
shown
[global]
printing = cups
printcap name = cups
The printerrsquos share is listed in the [printers] section in smbconf In the following
example the path is the path Samba uses as a spool directory and is not a normal
share path The settings allow anyone including guest to use the printer The
[printers] section in the default smbconf file has the following entries which are
appropriate for most setups
[printers]
comment = All Printers
path = varspoolsamba
browseable = no
guest ok = no
writable = no
printable = yes
Printing to WindowsCUPS views a printer on a Windows machine exactly the same way it views any
other printer The only difference is the URI you need to specify when connecting it
To configure a printer connected to a Windows machine click the Administration
tab in the CUPS Web interface and select Add Printer just as you would for a local
printer
When you are asked to select the device choose Windows Printer via SAMBA
Enter the URI of the printer in the following format
smbwindows_systemprinter_name
where windows_system can be an IP address or a hostname After you have added
the printer you can use it as you would any other printer
Policies The Policies selection enables you to control printer state sharing and banners
Under the word State are check boxes labeled Enabled Accepting jobs and Shared
Putting a tick in the check box labeled Shared shares the printer with other systems if the
local system publishes shared printers (see ldquoServer Settingsrdquo) The Policies tab also controls
whether the printer prints banners before and after jobs and what CUPS does when the printer
reports an error
Access Control The Access Control selection enables you to set the policy for printer access By
default anyone can use the printer To restrict access you can create a blacklist of
users who are not allowed to use it Alternatively you can prohibit anyone from
using the printer and then create a whitelist of users who are allowed to use it
Printer Options The Printer Options selection controls image quality paper size and source
(tray) and other generic printer options
Setting Up a Local or Remote PrinterThis section describes how to set up three types of printers for local use a printer
attached to the local system a printer hosted by another system and a printer that
resides on the local network (a network printer)
The system-config-printer utility looks for printers attached to the system or the local network It
then asks if you want to adjust the firewall so the local system can detect printers on the
network (Fedora only) and displays the New Printer window
Specifying a URI The easiest way to locate a remote printer that is not listed is to select Find
Network Printer under Network Printer in the frame labeled Select Device Then enter in the
text box labeled Host the name of the host the printer is attached to (the server) or
for a network printer the name of the printer You can specify an IP address instead of
a hostname
Click Find If it finds a printer system-config-printer displays the name of
the printer under Network Printer and fills in information about the printer on the
right side of the window
If the printer is not listed select Other (for a local printer) or one of the selections
under Network Printer (for a remote printer) from the frame labeled Select Device
system-config-printer displays appropriate text boxes on the right side of the window
All selections under Network Printer require you to specify a Host and a Queue or
Port number These values locate the printer on the network
To specify the queue for an LPDLPR printer use the form printer-name for an IPP
printer use the form printersprinter-name for an HP JetDirect-compatible network
printer specify the printer-name and Port number Replace printer-name with the
name of the printer on the server
If you are unsure of the name of a printer give the command lpstat ndashp on the server to
display the names of all printers on that system After selecting or specifying a printer
click the button labeled Verify (if present) to make sure the printer is accessible and
then click Forward The system-config-printer utility searches for the printer driver
At this point the system-config-printer utility closes the New Printer window asks if
you want to print a test page and displays the new printer in the Printing window
If you have more than one print queue and want to set up the new print queue to be
the default highlight the printer and select menubar Printer Set As Default
Sharing CUPS PrintersDisplay the Server Settings window by selecting menubar Server Settings and put a tick in the
Check box labeled Publish shared printers connected to this system Using this technique
allows you to chose whether to share each printer
IPP facilitates remote printing The Listen directive in the CUPS configuration file
etccupscupsdconf specifies which IP address and port or which domain socket path
CUPS binds to and accepts requests on The Listen directive has the following format
Listen IPport | path
where IP is the IP address that CUPS accepts connections on port is the port number
that CUPS listens on for connections on IP and path is the pathname of the domain
socket CUPS uses to communicate with printers CUPS typically uses port 631 and by
default binds to localhost Thus it accepts connections from the loopback service of
the local system only CUPS uses varruncupscupssock a local domain socket to
communicate with local printers It can also use a Port directive to specify the port
number it listens to for HTTP requests
$ grep -i listen etccupscupsdconf
Only listen for connections from the local machine
Listen localhost631
Listen varruncupscupssock
To allow other systems to connect to the CUPS server on the local system you must
instruct CUPS to bind to an IP address that the other systems can reach First
remove or comment out the Listen localhost631 directive leave the other Listen
directive in place
Listen localhost631
Listen varruncupscupssock
In place of the commented-out Listen directive use an access control list to permit
only selected machines to connect to local printers An access control list is
defined inside a ltLocationgt container (see page 934 for the Apache equivalent)
The following example allows only the system at IP address 1921681101 and
the local system to print to the specified printer
ltLocation gt
Order AllowDeny
Allow access from the local system and 1921681101
Allow from localhost
Allow from 1921681101
Uncomment the following line to permit access from all systems
Allow LOCAL
ltLocationgt
The LOCAL macro is internal to CUPS and specifies the local system This macro
accepts communication from any address that resolves to the local system Specify
Allow LOCAL to share the printer with all systems
Print from WindowsPrint Using CUPS
Modern versions of Windows (2000 and later) support IPP and as a result can communicate
directly with CUPS To use this feature you must have CUPS configured on
the Linux print server to allow remote IPP printing you also need to create a new
printer on the Windows system that points to the IP address of the Linux print server
First set up the etccupscupsdconf file to allow network printing from a client as
explained in ldquoSharing CUPS Printersrdquo
Windows XP From Windows XP go to Control Panel1048644Printers and Faxes and click Add Printer
Click Next in the introductory window and select A network printer or a printer
attached to another computer Click Next Select Connect to a printer on the Internet
or on a home or office network Continue following the next paragraph at
ldquoEnter URLrdquo
Windows 7 From Windows 7 go to Control Panel1048644Devices and Printers and click Add a
printer Click Add a network wireless or Bluetooth printer Assuming Windows
does not find the printer click The printer that I want isnrsquot listed Click the radio
button labeled Select a shared printer by name
Enter URL Enter the following information in the text box (under Windows XP it is labeled URL)
httphostname631printersprinter-name
where hostname is the name or IP address of the Linux CUPS server system and
printer-name is the name of the printer on that system For example for the printer
named dog88 on the system named dog at IP address 192168012 you could enter
httpdog631printersdog88 or http192168012631printersdog88 If you
use a hostname it must be defined in the hosts file on the Windows machine Click
Next Windows requests that you specify the manufacturer and model of printer or
provide a driver for the printer If you supply a printer driver use the Windows version
of the driver
Print Using SambaSamba must be set up so that the Windows user who will be printing is mapped to a
Linux user (including mapping the Windows guest user to the Linux user nobody)
Windows supports printer sharing via SMB which allows a printer to be shared
transparently between Windows systems using the same mechanism as file sharing
Samba allows Windows users to use printers connected to Linux systems just as
they would use any other shared printers
When you use rpm to install Samba it creates a directory named varspoolsamba
that is owned by the root account and that anyone can read from and write to
$ ls -ld varspoolsamba
drwxrwxrwt 2 root root 4096 02-03 1523 varspoolsamba
Under Fedora put the following two lines in the [global] section of the etcsambasmbconf
file Under RHEL these lines are set up by default you need only change the printcap name as
shown
[global]
printing = cups
printcap name = cups
The printerrsquos share is listed in the [printers] section in smbconf In the following
example the path is the path Samba uses as a spool directory and is not a normal
share path The settings allow anyone including guest to use the printer The
[printers] section in the default smbconf file has the following entries which are
appropriate for most setups
[printers]
comment = All Printers
path = varspoolsamba
browseable = no
guest ok = no
writable = no
printable = yes
Printing to WindowsCUPS views a printer on a Windows machine exactly the same way it views any
other printer The only difference is the URI you need to specify when connecting it
To configure a printer connected to a Windows machine click the Administration
tab in the CUPS Web interface and select Add Printer just as you would for a local
printer
When you are asked to select the device choose Windows Printer via SAMBA
Enter the URI of the printer in the following format
smbwindows_systemprinter_name
where windows_system can be an IP address or a hostname After you have added
the printer you can use it as you would any other printer
Access Control The Access Control selection enables you to set the policy for printer access By
default anyone can use the printer To restrict access you can create a blacklist of
users who are not allowed to use it Alternatively you can prohibit anyone from
using the printer and then create a whitelist of users who are allowed to use it
Printer Options The Printer Options selection controls image quality paper size and source
(tray) and other generic printer options
Setting Up a Local or Remote PrinterThis section describes how to set up three types of printers for local use a printer
attached to the local system a printer hosted by another system and a printer that
resides on the local network (a network printer)
The system-config-printer utility looks for printers attached to the system or the local network It
then asks if you want to adjust the firewall so the local system can detect printers on the
network (Fedora only) and displays the New Printer window
Specifying a URI The easiest way to locate a remote printer that is not listed is to select Find
Network Printer under Network Printer in the frame labeled Select Device Then enter in the
text box labeled Host the name of the host the printer is attached to (the server) or
for a network printer the name of the printer You can specify an IP address instead of
a hostname
Click Find If it finds a printer system-config-printer displays the name of
the printer under Network Printer and fills in information about the printer on the
right side of the window
If the printer is not listed select Other (for a local printer) or one of the selections
under Network Printer (for a remote printer) from the frame labeled Select Device
system-config-printer displays appropriate text boxes on the right side of the window
All selections under Network Printer require you to specify a Host and a Queue or
Port number These values locate the printer on the network
To specify the queue for an LPDLPR printer use the form printer-name for an IPP
printer use the form printersprinter-name for an HP JetDirect-compatible network
printer specify the printer-name and Port number Replace printer-name with the
name of the printer on the server
If you are unsure of the name of a printer give the command lpstat ndashp on the server to
display the names of all printers on that system After selecting or specifying a printer
click the button labeled Verify (if present) to make sure the printer is accessible and
then click Forward The system-config-printer utility searches for the printer driver
At this point the system-config-printer utility closes the New Printer window asks if
you want to print a test page and displays the new printer in the Printing window
If you have more than one print queue and want to set up the new print queue to be
the default highlight the printer and select menubar Printer Set As Default
Sharing CUPS PrintersDisplay the Server Settings window by selecting menubar Server Settings and put a tick in the
Check box labeled Publish shared printers connected to this system Using this technique
allows you to chose whether to share each printer
IPP facilitates remote printing The Listen directive in the CUPS configuration file
etccupscupsdconf specifies which IP address and port or which domain socket path
CUPS binds to and accepts requests on The Listen directive has the following format
Listen IPport | path
where IP is the IP address that CUPS accepts connections on port is the port number
that CUPS listens on for connections on IP and path is the pathname of the domain
socket CUPS uses to communicate with printers CUPS typically uses port 631 and by
default binds to localhost Thus it accepts connections from the loopback service of
the local system only CUPS uses varruncupscupssock a local domain socket to
communicate with local printers It can also use a Port directive to specify the port
number it listens to for HTTP requests
$ grep -i listen etccupscupsdconf
Only listen for connections from the local machine
Listen localhost631
Listen varruncupscupssock
To allow other systems to connect to the CUPS server on the local system you must
instruct CUPS to bind to an IP address that the other systems can reach First
remove or comment out the Listen localhost631 directive leave the other Listen
directive in place
Listen localhost631
Listen varruncupscupssock
In place of the commented-out Listen directive use an access control list to permit
only selected machines to connect to local printers An access control list is
defined inside a ltLocationgt container (see page 934 for the Apache equivalent)
The following example allows only the system at IP address 1921681101 and
the local system to print to the specified printer
ltLocation gt
Order AllowDeny
Allow access from the local system and 1921681101
Allow from localhost
Allow from 1921681101
Uncomment the following line to permit access from all systems
Allow LOCAL
ltLocationgt
The LOCAL macro is internal to CUPS and specifies the local system This macro
accepts communication from any address that resolves to the local system Specify
Allow LOCAL to share the printer with all systems
Print from WindowsPrint Using CUPS
Modern versions of Windows (2000 and later) support IPP and as a result can communicate
directly with CUPS To use this feature you must have CUPS configured on
the Linux print server to allow remote IPP printing you also need to create a new
printer on the Windows system that points to the IP address of the Linux print server
First set up the etccupscupsdconf file to allow network printing from a client as
explained in ldquoSharing CUPS Printersrdquo
Windows XP From Windows XP go to Control Panel1048644Printers and Faxes and click Add Printer
Click Next in the introductory window and select A network printer or a printer
attached to another computer Click Next Select Connect to a printer on the Internet
or on a home or office network Continue following the next paragraph at
ldquoEnter URLrdquo
Windows 7 From Windows 7 go to Control Panel1048644Devices and Printers and click Add a
printer Click Add a network wireless or Bluetooth printer Assuming Windows
does not find the printer click The printer that I want isnrsquot listed Click the radio
button labeled Select a shared printer by name
Enter URL Enter the following information in the text box (under Windows XP it is labeled URL)
httphostname631printersprinter-name
where hostname is the name or IP address of the Linux CUPS server system and
printer-name is the name of the printer on that system For example for the printer
named dog88 on the system named dog at IP address 192168012 you could enter
httpdog631printersdog88 or http192168012631printersdog88 If you
use a hostname it must be defined in the hosts file on the Windows machine Click
Next Windows requests that you specify the manufacturer and model of printer or
provide a driver for the printer If you supply a printer driver use the Windows version
of the driver
Print Using SambaSamba must be set up so that the Windows user who will be printing is mapped to a
Linux user (including mapping the Windows guest user to the Linux user nobody)
Windows supports printer sharing via SMB which allows a printer to be shared
transparently between Windows systems using the same mechanism as file sharing
Samba allows Windows users to use printers connected to Linux systems just as
they would use any other shared printers
When you use rpm to install Samba it creates a directory named varspoolsamba
that is owned by the root account and that anyone can read from and write to
$ ls -ld varspoolsamba
drwxrwxrwt 2 root root 4096 02-03 1523 varspoolsamba
Under Fedora put the following two lines in the [global] section of the etcsambasmbconf
file Under RHEL these lines are set up by default you need only change the printcap name as
shown
[global]
printing = cups
printcap name = cups
The printerrsquos share is listed in the [printers] section in smbconf In the following
example the path is the path Samba uses as a spool directory and is not a normal
share path The settings allow anyone including guest to use the printer The
[printers] section in the default smbconf file has the following entries which are
appropriate for most setups
[printers]
comment = All Printers
path = varspoolsamba
browseable = no
guest ok = no
writable = no
printable = yes
Printing to WindowsCUPS views a printer on a Windows machine exactly the same way it views any
other printer The only difference is the URI you need to specify when connecting it
To configure a printer connected to a Windows machine click the Administration
tab in the CUPS Web interface and select Add Printer just as you would for a local
printer
When you are asked to select the device choose Windows Printer via SAMBA
Enter the URI of the printer in the following format
smbwindows_systemprinter_name
where windows_system can be an IP address or a hostname After you have added
the printer you can use it as you would any other printer
Setting Up a Local or Remote PrinterThis section describes how to set up three types of printers for local use a printer
attached to the local system a printer hosted by another system and a printer that
resides on the local network (a network printer)
The system-config-printer utility looks for printers attached to the system or the local network It
then asks if you want to adjust the firewall so the local system can detect printers on the
network (Fedora only) and displays the New Printer window
Specifying a URI The easiest way to locate a remote printer that is not listed is to select Find
Network Printer under Network Printer in the frame labeled Select Device Then enter in the
text box labeled Host the name of the host the printer is attached to (the server) or
for a network printer the name of the printer You can specify an IP address instead of
a hostname
Click Find If it finds a printer system-config-printer displays the name of
the printer under Network Printer and fills in information about the printer on the
right side of the window
If the printer is not listed select Other (for a local printer) or one of the selections
under Network Printer (for a remote printer) from the frame labeled Select Device
system-config-printer displays appropriate text boxes on the right side of the window
All selections under Network Printer require you to specify a Host and a Queue or
Port number These values locate the printer on the network
To specify the queue for an LPDLPR printer use the form printer-name for an IPP
printer use the form printersprinter-name for an HP JetDirect-compatible network
printer specify the printer-name and Port number Replace printer-name with the
name of the printer on the server
If you are unsure of the name of a printer give the command lpstat ndashp on the server to
display the names of all printers on that system After selecting or specifying a printer
click the button labeled Verify (if present) to make sure the printer is accessible and
then click Forward The system-config-printer utility searches for the printer driver
At this point the system-config-printer utility closes the New Printer window asks if
you want to print a test page and displays the new printer in the Printing window
If you have more than one print queue and want to set up the new print queue to be
the default highlight the printer and select menubar Printer Set As Default
Sharing CUPS PrintersDisplay the Server Settings window by selecting menubar Server Settings and put a tick in the
Check box labeled Publish shared printers connected to this system Using this technique
allows you to chose whether to share each printer
IPP facilitates remote printing The Listen directive in the CUPS configuration file
etccupscupsdconf specifies which IP address and port or which domain socket path
CUPS binds to and accepts requests on The Listen directive has the following format
Listen IPport | path
where IP is the IP address that CUPS accepts connections on port is the port number
that CUPS listens on for connections on IP and path is the pathname of the domain
socket CUPS uses to communicate with printers CUPS typically uses port 631 and by
default binds to localhost Thus it accepts connections from the loopback service of
the local system only CUPS uses varruncupscupssock a local domain socket to
communicate with local printers It can also use a Port directive to specify the port
number it listens to for HTTP requests
$ grep -i listen etccupscupsdconf
Only listen for connections from the local machine
Listen localhost631
Listen varruncupscupssock
To allow other systems to connect to the CUPS server on the local system you must
instruct CUPS to bind to an IP address that the other systems can reach First
remove or comment out the Listen localhost631 directive leave the other Listen
directive in place
Listen localhost631
Listen varruncupscupssock
In place of the commented-out Listen directive use an access control list to permit
only selected machines to connect to local printers An access control list is
defined inside a ltLocationgt container (see page 934 for the Apache equivalent)
The following example allows only the system at IP address 1921681101 and
the local system to print to the specified printer
ltLocation gt
Order AllowDeny
Allow access from the local system and 1921681101
Allow from localhost
Allow from 1921681101
Uncomment the following line to permit access from all systems
Allow LOCAL
ltLocationgt
The LOCAL macro is internal to CUPS and specifies the local system This macro
accepts communication from any address that resolves to the local system Specify
Allow LOCAL to share the printer with all systems
Print from WindowsPrint Using CUPS
Modern versions of Windows (2000 and later) support IPP and as a result can communicate
directly with CUPS To use this feature you must have CUPS configured on
the Linux print server to allow remote IPP printing you also need to create a new
printer on the Windows system that points to the IP address of the Linux print server
First set up the etccupscupsdconf file to allow network printing from a client as
explained in ldquoSharing CUPS Printersrdquo
Windows XP From Windows XP go to Control Panel1048644Printers and Faxes and click Add Printer
Click Next in the introductory window and select A network printer or a printer
attached to another computer Click Next Select Connect to a printer on the Internet
or on a home or office network Continue following the next paragraph at
ldquoEnter URLrdquo
Windows 7 From Windows 7 go to Control Panel1048644Devices and Printers and click Add a
printer Click Add a network wireless or Bluetooth printer Assuming Windows
does not find the printer click The printer that I want isnrsquot listed Click the radio
button labeled Select a shared printer by name
Enter URL Enter the following information in the text box (under Windows XP it is labeled URL)
httphostname631printersprinter-name
where hostname is the name or IP address of the Linux CUPS server system and
printer-name is the name of the printer on that system For example for the printer
named dog88 on the system named dog at IP address 192168012 you could enter
httpdog631printersdog88 or http192168012631printersdog88 If you
use a hostname it must be defined in the hosts file on the Windows machine Click
Next Windows requests that you specify the manufacturer and model of printer or
provide a driver for the printer If you supply a printer driver use the Windows version
of the driver
Print Using SambaSamba must be set up so that the Windows user who will be printing is mapped to a
Linux user (including mapping the Windows guest user to the Linux user nobody)
Windows supports printer sharing via SMB which allows a printer to be shared
transparently between Windows systems using the same mechanism as file sharing
Samba allows Windows users to use printers connected to Linux systems just as
they would use any other shared printers
When you use rpm to install Samba it creates a directory named varspoolsamba
that is owned by the root account and that anyone can read from and write to
$ ls -ld varspoolsamba
drwxrwxrwt 2 root root 4096 02-03 1523 varspoolsamba
Under Fedora put the following two lines in the [global] section of the etcsambasmbconf
file Under RHEL these lines are set up by default you need only change the printcap name as
shown
[global]
printing = cups
printcap name = cups
The printerrsquos share is listed in the [printers] section in smbconf In the following
example the path is the path Samba uses as a spool directory and is not a normal
share path The settings allow anyone including guest to use the printer The
[printers] section in the default smbconf file has the following entries which are
appropriate for most setups
[printers]
comment = All Printers
path = varspoolsamba
browseable = no
guest ok = no
writable = no
printable = yes
Printing to WindowsCUPS views a printer on a Windows machine exactly the same way it views any
other printer The only difference is the URI you need to specify when connecting it
To configure a printer connected to a Windows machine click the Administration
tab in the CUPS Web interface and select Add Printer just as you would for a local
printer
When you are asked to select the device choose Windows Printer via SAMBA
Enter the URI of the printer in the following format
smbwindows_systemprinter_name
where windows_system can be an IP address or a hostname After you have added
the printer you can use it as you would any other printer
Specifying a URI The easiest way to locate a remote printer that is not listed is to select Find
Network Printer under Network Printer in the frame labeled Select Device Then enter in the
text box labeled Host the name of the host the printer is attached to (the server) or
for a network printer the name of the printer You can specify an IP address instead of
a hostname
Click Find If it finds a printer system-config-printer displays the name of
the printer under Network Printer and fills in information about the printer on the
right side of the window
If the printer is not listed select Other (for a local printer) or one of the selections
under Network Printer (for a remote printer) from the frame labeled Select Device
system-config-printer displays appropriate text boxes on the right side of the window
All selections under Network Printer require you to specify a Host and a Queue or
Port number These values locate the printer on the network
To specify the queue for an LPDLPR printer use the form printer-name for an IPP
printer use the form printersprinter-name for an HP JetDirect-compatible network
printer specify the printer-name and Port number Replace printer-name with the
name of the printer on the server
If you are unsure of the name of a printer give the command lpstat ndashp on the server to
display the names of all printers on that system After selecting or specifying a printer
click the button labeled Verify (if present) to make sure the printer is accessible and
then click Forward The system-config-printer utility searches for the printer driver
At this point the system-config-printer utility closes the New Printer window asks if
you want to print a test page and displays the new printer in the Printing window
If you have more than one print queue and want to set up the new print queue to be
the default highlight the printer and select menubar Printer Set As Default
Sharing CUPS PrintersDisplay the Server Settings window by selecting menubar Server Settings and put a tick in the
Check box labeled Publish shared printers connected to this system Using this technique
allows you to chose whether to share each printer
IPP facilitates remote printing The Listen directive in the CUPS configuration file
etccupscupsdconf specifies which IP address and port or which domain socket path
CUPS binds to and accepts requests on The Listen directive has the following format
Listen IPport | path
where IP is the IP address that CUPS accepts connections on port is the port number
that CUPS listens on for connections on IP and path is the pathname of the domain
socket CUPS uses to communicate with printers CUPS typically uses port 631 and by
default binds to localhost Thus it accepts connections from the loopback service of
the local system only CUPS uses varruncupscupssock a local domain socket to
communicate with local printers It can also use a Port directive to specify the port
number it listens to for HTTP requests
$ grep -i listen etccupscupsdconf
Only listen for connections from the local machine
Listen localhost631
Listen varruncupscupssock
To allow other systems to connect to the CUPS server on the local system you must
instruct CUPS to bind to an IP address that the other systems can reach First
remove or comment out the Listen localhost631 directive leave the other Listen
directive in place
Listen localhost631
Listen varruncupscupssock
In place of the commented-out Listen directive use an access control list to permit
only selected machines to connect to local printers An access control list is
defined inside a ltLocationgt container (see page 934 for the Apache equivalent)
The following example allows only the system at IP address 1921681101 and
the local system to print to the specified printer
ltLocation gt
Order AllowDeny
Allow access from the local system and 1921681101
Allow from localhost
Allow from 1921681101
Uncomment the following line to permit access from all systems
Allow LOCAL
ltLocationgt
The LOCAL macro is internal to CUPS and specifies the local system This macro
accepts communication from any address that resolves to the local system Specify
Allow LOCAL to share the printer with all systems
Print from WindowsPrint Using CUPS
Modern versions of Windows (2000 and later) support IPP and as a result can communicate
directly with CUPS To use this feature you must have CUPS configured on
the Linux print server to allow remote IPP printing you also need to create a new
printer on the Windows system that points to the IP address of the Linux print server
First set up the etccupscupsdconf file to allow network printing from a client as
explained in ldquoSharing CUPS Printersrdquo
Windows XP From Windows XP go to Control Panel1048644Printers and Faxes and click Add Printer
Click Next in the introductory window and select A network printer or a printer
attached to another computer Click Next Select Connect to a printer on the Internet
or on a home or office network Continue following the next paragraph at
ldquoEnter URLrdquo
Windows 7 From Windows 7 go to Control Panel1048644Devices and Printers and click Add a
printer Click Add a network wireless or Bluetooth printer Assuming Windows
does not find the printer click The printer that I want isnrsquot listed Click the radio
button labeled Select a shared printer by name
Enter URL Enter the following information in the text box (under Windows XP it is labeled URL)
httphostname631printersprinter-name
where hostname is the name or IP address of the Linux CUPS server system and
printer-name is the name of the printer on that system For example for the printer
named dog88 on the system named dog at IP address 192168012 you could enter
httpdog631printersdog88 or http192168012631printersdog88 If you
use a hostname it must be defined in the hosts file on the Windows machine Click
Next Windows requests that you specify the manufacturer and model of printer or
provide a driver for the printer If you supply a printer driver use the Windows version
of the driver
Print Using SambaSamba must be set up so that the Windows user who will be printing is mapped to a
Linux user (including mapping the Windows guest user to the Linux user nobody)
Windows supports printer sharing via SMB which allows a printer to be shared
transparently between Windows systems using the same mechanism as file sharing
Samba allows Windows users to use printers connected to Linux systems just as
they would use any other shared printers
When you use rpm to install Samba it creates a directory named varspoolsamba
that is owned by the root account and that anyone can read from and write to
$ ls -ld varspoolsamba
drwxrwxrwt 2 root root 4096 02-03 1523 varspoolsamba
Under Fedora put the following two lines in the [global] section of the etcsambasmbconf
file Under RHEL these lines are set up by default you need only change the printcap name as
shown
[global]
printing = cups
printcap name = cups
The printerrsquos share is listed in the [printers] section in smbconf In the following
example the path is the path Samba uses as a spool directory and is not a normal
share path The settings allow anyone including guest to use the printer The
[printers] section in the default smbconf file has the following entries which are
appropriate for most setups
[printers]
comment = All Printers
path = varspoolsamba
browseable = no
guest ok = no
writable = no
printable = yes
Printing to WindowsCUPS views a printer on a Windows machine exactly the same way it views any
other printer The only difference is the URI you need to specify when connecting it
To configure a printer connected to a Windows machine click the Administration
tab in the CUPS Web interface and select Add Printer just as you would for a local
printer
When you are asked to select the device choose Windows Printer via SAMBA
Enter the URI of the printer in the following format
smbwindows_systemprinter_name
where windows_system can be an IP address or a hostname After you have added
the printer you can use it as you would any other printer
If the printer is not listed select Other (for a local printer) or one of the selections
under Network Printer (for a remote printer) from the frame labeled Select Device
system-config-printer displays appropriate text boxes on the right side of the window
All selections under Network Printer require you to specify a Host and a Queue or
Port number These values locate the printer on the network
To specify the queue for an LPDLPR printer use the form printer-name for an IPP
printer use the form printersprinter-name for an HP JetDirect-compatible network
printer specify the printer-name and Port number Replace printer-name with the
name of the printer on the server
If you are unsure of the name of a printer give the command lpstat ndashp on the server to
display the names of all printers on that system After selecting or specifying a printer
click the button labeled Verify (if present) to make sure the printer is accessible and
then click Forward The system-config-printer utility searches for the printer driver
At this point the system-config-printer utility closes the New Printer window asks if
you want to print a test page and displays the new printer in the Printing window
If you have more than one print queue and want to set up the new print queue to be
the default highlight the printer and select menubar Printer Set As Default
Sharing CUPS PrintersDisplay the Server Settings window by selecting menubar Server Settings and put a tick in the
Check box labeled Publish shared printers connected to this system Using this technique
allows you to chose whether to share each printer
IPP facilitates remote printing The Listen directive in the CUPS configuration file
etccupscupsdconf specifies which IP address and port or which domain socket path
CUPS binds to and accepts requests on The Listen directive has the following format
Listen IPport | path
where IP is the IP address that CUPS accepts connections on port is the port number
that CUPS listens on for connections on IP and path is the pathname of the domain
socket CUPS uses to communicate with printers CUPS typically uses port 631 and by
default binds to localhost Thus it accepts connections from the loopback service of
the local system only CUPS uses varruncupscupssock a local domain socket to
communicate with local printers It can also use a Port directive to specify the port
number it listens to for HTTP requests
$ grep -i listen etccupscupsdconf
Only listen for connections from the local machine
Listen localhost631
Listen varruncupscupssock
To allow other systems to connect to the CUPS server on the local system you must
instruct CUPS to bind to an IP address that the other systems can reach First
remove or comment out the Listen localhost631 directive leave the other Listen
directive in place
Listen localhost631
Listen varruncupscupssock
In place of the commented-out Listen directive use an access control list to permit
only selected machines to connect to local printers An access control list is
defined inside a ltLocationgt container (see page 934 for the Apache equivalent)
The following example allows only the system at IP address 1921681101 and
the local system to print to the specified printer
ltLocation gt
Order AllowDeny
Allow access from the local system and 1921681101
Allow from localhost
Allow from 1921681101
Uncomment the following line to permit access from all systems
Allow LOCAL
ltLocationgt
The LOCAL macro is internal to CUPS and specifies the local system This macro
accepts communication from any address that resolves to the local system Specify
Allow LOCAL to share the printer with all systems
Print from WindowsPrint Using CUPS
Modern versions of Windows (2000 and later) support IPP and as a result can communicate
directly with CUPS To use this feature you must have CUPS configured on
the Linux print server to allow remote IPP printing you also need to create a new
printer on the Windows system that points to the IP address of the Linux print server
First set up the etccupscupsdconf file to allow network printing from a client as
explained in ldquoSharing CUPS Printersrdquo
Windows XP From Windows XP go to Control Panel1048644Printers and Faxes and click Add Printer
Click Next in the introductory window and select A network printer or a printer
attached to another computer Click Next Select Connect to a printer on the Internet
or on a home or office network Continue following the next paragraph at
ldquoEnter URLrdquo
Windows 7 From Windows 7 go to Control Panel1048644Devices and Printers and click Add a
printer Click Add a network wireless or Bluetooth printer Assuming Windows
does not find the printer click The printer that I want isnrsquot listed Click the radio
button labeled Select a shared printer by name
Enter URL Enter the following information in the text box (under Windows XP it is labeled URL)
httphostname631printersprinter-name
where hostname is the name or IP address of the Linux CUPS server system and
printer-name is the name of the printer on that system For example for the printer
named dog88 on the system named dog at IP address 192168012 you could enter
httpdog631printersdog88 or http192168012631printersdog88 If you
use a hostname it must be defined in the hosts file on the Windows machine Click
Next Windows requests that you specify the manufacturer and model of printer or
provide a driver for the printer If you supply a printer driver use the Windows version
of the driver
Print Using SambaSamba must be set up so that the Windows user who will be printing is mapped to a
Linux user (including mapping the Windows guest user to the Linux user nobody)
Windows supports printer sharing via SMB which allows a printer to be shared
transparently between Windows systems using the same mechanism as file sharing
Samba allows Windows users to use printers connected to Linux systems just as
they would use any other shared printers
When you use rpm to install Samba it creates a directory named varspoolsamba
that is owned by the root account and that anyone can read from and write to
$ ls -ld varspoolsamba
drwxrwxrwt 2 root root 4096 02-03 1523 varspoolsamba
Under Fedora put the following two lines in the [global] section of the etcsambasmbconf
file Under RHEL these lines are set up by default you need only change the printcap name as
shown
[global]
printing = cups
printcap name = cups
The printerrsquos share is listed in the [printers] section in smbconf In the following
example the path is the path Samba uses as a spool directory and is not a normal
share path The settings allow anyone including guest to use the printer The
[printers] section in the default smbconf file has the following entries which are
appropriate for most setups
[printers]
comment = All Printers
path = varspoolsamba
browseable = no
guest ok = no
writable = no
printable = yes
Printing to WindowsCUPS views a printer on a Windows machine exactly the same way it views any
other printer The only difference is the URI you need to specify when connecting it
To configure a printer connected to a Windows machine click the Administration
tab in the CUPS Web interface and select Add Printer just as you would for a local
printer
When you are asked to select the device choose Windows Printer via SAMBA
Enter the URI of the printer in the following format
smbwindows_systemprinter_name
where windows_system can be an IP address or a hostname After you have added
the printer you can use it as you would any other printer
To specify the queue for an LPDLPR printer use the form printer-name for an IPP
printer use the form printersprinter-name for an HP JetDirect-compatible network
printer specify the printer-name and Port number Replace printer-name with the
name of the printer on the server
If you are unsure of the name of a printer give the command lpstat ndashp on the server to
display the names of all printers on that system After selecting or specifying a printer
click the button labeled Verify (if present) to make sure the printer is accessible and
then click Forward The system-config-printer utility searches for the printer driver
At this point the system-config-printer utility closes the New Printer window asks if
you want to print a test page and displays the new printer in the Printing window
If you have more than one print queue and want to set up the new print queue to be
the default highlight the printer and select menubar Printer Set As Default
Sharing CUPS PrintersDisplay the Server Settings window by selecting menubar Server Settings and put a tick in the
Check box labeled Publish shared printers connected to this system Using this technique
allows you to chose whether to share each printer
IPP facilitates remote printing The Listen directive in the CUPS configuration file
etccupscupsdconf specifies which IP address and port or which domain socket path
CUPS binds to and accepts requests on The Listen directive has the following format
Listen IPport | path
where IP is the IP address that CUPS accepts connections on port is the port number
that CUPS listens on for connections on IP and path is the pathname of the domain
socket CUPS uses to communicate with printers CUPS typically uses port 631 and by
default binds to localhost Thus it accepts connections from the loopback service of
the local system only CUPS uses varruncupscupssock a local domain socket to
communicate with local printers It can also use a Port directive to specify the port
number it listens to for HTTP requests
$ grep -i listen etccupscupsdconf
Only listen for connections from the local machine
Listen localhost631
Listen varruncupscupssock
To allow other systems to connect to the CUPS server on the local system you must
instruct CUPS to bind to an IP address that the other systems can reach First
remove or comment out the Listen localhost631 directive leave the other Listen
directive in place
Listen localhost631
Listen varruncupscupssock
In place of the commented-out Listen directive use an access control list to permit
only selected machines to connect to local printers An access control list is
defined inside a ltLocationgt container (see page 934 for the Apache equivalent)
The following example allows only the system at IP address 1921681101 and
the local system to print to the specified printer
ltLocation gt
Order AllowDeny
Allow access from the local system and 1921681101
Allow from localhost
Allow from 1921681101
Uncomment the following line to permit access from all systems
Allow LOCAL
ltLocationgt
The LOCAL macro is internal to CUPS and specifies the local system This macro
accepts communication from any address that resolves to the local system Specify
Allow LOCAL to share the printer with all systems
Print from WindowsPrint Using CUPS
Modern versions of Windows (2000 and later) support IPP and as a result can communicate
directly with CUPS To use this feature you must have CUPS configured on
the Linux print server to allow remote IPP printing you also need to create a new
printer on the Windows system that points to the IP address of the Linux print server
First set up the etccupscupsdconf file to allow network printing from a client as
explained in ldquoSharing CUPS Printersrdquo
Windows XP From Windows XP go to Control Panel1048644Printers and Faxes and click Add Printer
Click Next in the introductory window and select A network printer or a printer
attached to another computer Click Next Select Connect to a printer on the Internet
or on a home or office network Continue following the next paragraph at
ldquoEnter URLrdquo
Windows 7 From Windows 7 go to Control Panel1048644Devices and Printers and click Add a
printer Click Add a network wireless or Bluetooth printer Assuming Windows
does not find the printer click The printer that I want isnrsquot listed Click the radio
button labeled Select a shared printer by name
Enter URL Enter the following information in the text box (under Windows XP it is labeled URL)
httphostname631printersprinter-name
where hostname is the name or IP address of the Linux CUPS server system and
printer-name is the name of the printer on that system For example for the printer
named dog88 on the system named dog at IP address 192168012 you could enter
httpdog631printersdog88 or http192168012631printersdog88 If you
use a hostname it must be defined in the hosts file on the Windows machine Click
Next Windows requests that you specify the manufacturer and model of printer or
provide a driver for the printer If you supply a printer driver use the Windows version
of the driver
Print Using SambaSamba must be set up so that the Windows user who will be printing is mapped to a
Linux user (including mapping the Windows guest user to the Linux user nobody)
Windows supports printer sharing via SMB which allows a printer to be shared
transparently between Windows systems using the same mechanism as file sharing
Samba allows Windows users to use printers connected to Linux systems just as
they would use any other shared printers
When you use rpm to install Samba it creates a directory named varspoolsamba
that is owned by the root account and that anyone can read from and write to
$ ls -ld varspoolsamba
drwxrwxrwt 2 root root 4096 02-03 1523 varspoolsamba
Under Fedora put the following two lines in the [global] section of the etcsambasmbconf
file Under RHEL these lines are set up by default you need only change the printcap name as
shown
[global]
printing = cups
printcap name = cups
The printerrsquos share is listed in the [printers] section in smbconf In the following
example the path is the path Samba uses as a spool directory and is not a normal
share path The settings allow anyone including guest to use the printer The
[printers] section in the default smbconf file has the following entries which are
appropriate for most setups
[printers]
comment = All Printers
path = varspoolsamba
browseable = no
guest ok = no
writable = no
printable = yes
Printing to WindowsCUPS views a printer on a Windows machine exactly the same way it views any
other printer The only difference is the URI you need to specify when connecting it
To configure a printer connected to a Windows machine click the Administration
tab in the CUPS Web interface and select Add Printer just as you would for a local
printer
When you are asked to select the device choose Windows Printer via SAMBA
Enter the URI of the printer in the following format
smbwindows_systemprinter_name
where windows_system can be an IP address or a hostname After you have added
the printer you can use it as you would any other printer
At this point the system-config-printer utility closes the New Printer window asks if
you want to print a test page and displays the new printer in the Printing window
If you have more than one print queue and want to set up the new print queue to be
the default highlight the printer and select menubar Printer Set As Default
Sharing CUPS PrintersDisplay the Server Settings window by selecting menubar Server Settings and put a tick in the
Check box labeled Publish shared printers connected to this system Using this technique
allows you to chose whether to share each printer
IPP facilitates remote printing The Listen directive in the CUPS configuration file
etccupscupsdconf specifies which IP address and port or which domain socket path
CUPS binds to and accepts requests on The Listen directive has the following format
Listen IPport | path
where IP is the IP address that CUPS accepts connections on port is the port number
that CUPS listens on for connections on IP and path is the pathname of the domain
socket CUPS uses to communicate with printers CUPS typically uses port 631 and by
default binds to localhost Thus it accepts connections from the loopback service of
the local system only CUPS uses varruncupscupssock a local domain socket to
communicate with local printers It can also use a Port directive to specify the port
number it listens to for HTTP requests
$ grep -i listen etccupscupsdconf
Only listen for connections from the local machine
Listen localhost631
Listen varruncupscupssock
To allow other systems to connect to the CUPS server on the local system you must
instruct CUPS to bind to an IP address that the other systems can reach First
remove or comment out the Listen localhost631 directive leave the other Listen
directive in place
Listen localhost631
Listen varruncupscupssock
In place of the commented-out Listen directive use an access control list to permit
only selected machines to connect to local printers An access control list is
defined inside a ltLocationgt container (see page 934 for the Apache equivalent)
The following example allows only the system at IP address 1921681101 and
the local system to print to the specified printer
ltLocation gt
Order AllowDeny
Allow access from the local system and 1921681101
Allow from localhost
Allow from 1921681101
Uncomment the following line to permit access from all systems
Allow LOCAL
ltLocationgt
The LOCAL macro is internal to CUPS and specifies the local system This macro
accepts communication from any address that resolves to the local system Specify
Allow LOCAL to share the printer with all systems
Print from WindowsPrint Using CUPS
Modern versions of Windows (2000 and later) support IPP and as a result can communicate
directly with CUPS To use this feature you must have CUPS configured on
the Linux print server to allow remote IPP printing you also need to create a new
printer on the Windows system that points to the IP address of the Linux print server
First set up the etccupscupsdconf file to allow network printing from a client as
explained in ldquoSharing CUPS Printersrdquo
Windows XP From Windows XP go to Control Panel1048644Printers and Faxes and click Add Printer
Click Next in the introductory window and select A network printer or a printer
attached to another computer Click Next Select Connect to a printer on the Internet
or on a home or office network Continue following the next paragraph at
ldquoEnter URLrdquo
Windows 7 From Windows 7 go to Control Panel1048644Devices and Printers and click Add a
printer Click Add a network wireless or Bluetooth printer Assuming Windows
does not find the printer click The printer that I want isnrsquot listed Click the radio
button labeled Select a shared printer by name
Enter URL Enter the following information in the text box (under Windows XP it is labeled URL)
httphostname631printersprinter-name
where hostname is the name or IP address of the Linux CUPS server system and
printer-name is the name of the printer on that system For example for the printer
named dog88 on the system named dog at IP address 192168012 you could enter
httpdog631printersdog88 or http192168012631printersdog88 If you
use a hostname it must be defined in the hosts file on the Windows machine Click
Next Windows requests that you specify the manufacturer and model of printer or
provide a driver for the printer If you supply a printer driver use the Windows version
of the driver
Print Using SambaSamba must be set up so that the Windows user who will be printing is mapped to a
Linux user (including mapping the Windows guest user to the Linux user nobody)
Windows supports printer sharing via SMB which allows a printer to be shared
transparently between Windows systems using the same mechanism as file sharing
Samba allows Windows users to use printers connected to Linux systems just as
they would use any other shared printers
When you use rpm to install Samba it creates a directory named varspoolsamba
that is owned by the root account and that anyone can read from and write to
$ ls -ld varspoolsamba
drwxrwxrwt 2 root root 4096 02-03 1523 varspoolsamba
Under Fedora put the following two lines in the [global] section of the etcsambasmbconf
file Under RHEL these lines are set up by default you need only change the printcap name as
shown
[global]
printing = cups
printcap name = cups
The printerrsquos share is listed in the [printers] section in smbconf In the following
example the path is the path Samba uses as a spool directory and is not a normal
share path The settings allow anyone including guest to use the printer The
[printers] section in the default smbconf file has the following entries which are
appropriate for most setups
[printers]
comment = All Printers
path = varspoolsamba
browseable = no
guest ok = no
writable = no
printable = yes
Printing to WindowsCUPS views a printer on a Windows machine exactly the same way it views any
other printer The only difference is the URI you need to specify when connecting it
To configure a printer connected to a Windows machine click the Administration
tab in the CUPS Web interface and select Add Printer just as you would for a local
printer
When you are asked to select the device choose Windows Printer via SAMBA
Enter the URI of the printer in the following format
smbwindows_systemprinter_name
where windows_system can be an IP address or a hostname After you have added
the printer you can use it as you would any other printer
Sharing CUPS PrintersDisplay the Server Settings window by selecting menubar Server Settings and put a tick in the
Check box labeled Publish shared printers connected to this system Using this technique
allows you to chose whether to share each printer
IPP facilitates remote printing The Listen directive in the CUPS configuration file
etccupscupsdconf specifies which IP address and port or which domain socket path
CUPS binds to and accepts requests on The Listen directive has the following format
Listen IPport | path
where IP is the IP address that CUPS accepts connections on port is the port number
that CUPS listens on for connections on IP and path is the pathname of the domain
socket CUPS uses to communicate with printers CUPS typically uses port 631 and by
default binds to localhost Thus it accepts connections from the loopback service of
the local system only CUPS uses varruncupscupssock a local domain socket to
communicate with local printers It can also use a Port directive to specify the port
number it listens to for HTTP requests
$ grep -i listen etccupscupsdconf
Only listen for connections from the local machine
Listen localhost631
Listen varruncupscupssock
To allow other systems to connect to the CUPS server on the local system you must
instruct CUPS to bind to an IP address that the other systems can reach First
remove or comment out the Listen localhost631 directive leave the other Listen
directive in place
Listen localhost631
Listen varruncupscupssock
In place of the commented-out Listen directive use an access control list to permit
only selected machines to connect to local printers An access control list is
defined inside a ltLocationgt container (see page 934 for the Apache equivalent)
The following example allows only the system at IP address 1921681101 and
the local system to print to the specified printer
ltLocation gt
Order AllowDeny
Allow access from the local system and 1921681101
Allow from localhost
Allow from 1921681101
Uncomment the following line to permit access from all systems
Allow LOCAL
ltLocationgt
The LOCAL macro is internal to CUPS and specifies the local system This macro
accepts communication from any address that resolves to the local system Specify
Allow LOCAL to share the printer with all systems
Print from WindowsPrint Using CUPS
Modern versions of Windows (2000 and later) support IPP and as a result can communicate
directly with CUPS To use this feature you must have CUPS configured on
the Linux print server to allow remote IPP printing you also need to create a new
printer on the Windows system that points to the IP address of the Linux print server
First set up the etccupscupsdconf file to allow network printing from a client as
explained in ldquoSharing CUPS Printersrdquo
Windows XP From Windows XP go to Control Panel1048644Printers and Faxes and click Add Printer
Click Next in the introductory window and select A network printer or a printer
attached to another computer Click Next Select Connect to a printer on the Internet
or on a home or office network Continue following the next paragraph at
ldquoEnter URLrdquo
Windows 7 From Windows 7 go to Control Panel1048644Devices and Printers and click Add a
printer Click Add a network wireless or Bluetooth printer Assuming Windows
does not find the printer click The printer that I want isnrsquot listed Click the radio
button labeled Select a shared printer by name
Enter URL Enter the following information in the text box (under Windows XP it is labeled URL)
httphostname631printersprinter-name
where hostname is the name or IP address of the Linux CUPS server system and
printer-name is the name of the printer on that system For example for the printer
named dog88 on the system named dog at IP address 192168012 you could enter
httpdog631printersdog88 or http192168012631printersdog88 If you
use a hostname it must be defined in the hosts file on the Windows machine Click
Next Windows requests that you specify the manufacturer and model of printer or
provide a driver for the printer If you supply a printer driver use the Windows version
of the driver
Print Using SambaSamba must be set up so that the Windows user who will be printing is mapped to a
Linux user (including mapping the Windows guest user to the Linux user nobody)
Windows supports printer sharing via SMB which allows a printer to be shared
transparently between Windows systems using the same mechanism as file sharing
Samba allows Windows users to use printers connected to Linux systems just as
they would use any other shared printers
When you use rpm to install Samba it creates a directory named varspoolsamba
that is owned by the root account and that anyone can read from and write to
$ ls -ld varspoolsamba
drwxrwxrwt 2 root root 4096 02-03 1523 varspoolsamba
Under Fedora put the following two lines in the [global] section of the etcsambasmbconf
file Under RHEL these lines are set up by default you need only change the printcap name as
shown
[global]
printing = cups
printcap name = cups
The printerrsquos share is listed in the [printers] section in smbconf In the following
example the path is the path Samba uses as a spool directory and is not a normal
share path The settings allow anyone including guest to use the printer The
[printers] section in the default smbconf file has the following entries which are
appropriate for most setups
[printers]
comment = All Printers
path = varspoolsamba
browseable = no
guest ok = no
writable = no
printable = yes
Printing to WindowsCUPS views a printer on a Windows machine exactly the same way it views any
other printer The only difference is the URI you need to specify when connecting it
To configure a printer connected to a Windows machine click the Administration
tab in the CUPS Web interface and select Add Printer just as you would for a local
printer
When you are asked to select the device choose Windows Printer via SAMBA
Enter the URI of the printer in the following format
smbwindows_systemprinter_name
where windows_system can be an IP address or a hostname After you have added
the printer you can use it as you would any other printer
IPP facilitates remote printing The Listen directive in the CUPS configuration file
etccupscupsdconf specifies which IP address and port or which domain socket path
CUPS binds to and accepts requests on The Listen directive has the following format
Listen IPport | path
where IP is the IP address that CUPS accepts connections on port is the port number
that CUPS listens on for connections on IP and path is the pathname of the domain
socket CUPS uses to communicate with printers CUPS typically uses port 631 and by
default binds to localhost Thus it accepts connections from the loopback service of
the local system only CUPS uses varruncupscupssock a local domain socket to
communicate with local printers It can also use a Port directive to specify the port
number it listens to for HTTP requests
$ grep -i listen etccupscupsdconf
Only listen for connections from the local machine
Listen localhost631
Listen varruncupscupssock
To allow other systems to connect to the CUPS server on the local system you must
instruct CUPS to bind to an IP address that the other systems can reach First
remove or comment out the Listen localhost631 directive leave the other Listen
directive in place
Listen localhost631
Listen varruncupscupssock
In place of the commented-out Listen directive use an access control list to permit
only selected machines to connect to local printers An access control list is
defined inside a ltLocationgt container (see page 934 for the Apache equivalent)
The following example allows only the system at IP address 1921681101 and
the local system to print to the specified printer
ltLocation gt
Order AllowDeny
Allow access from the local system and 1921681101
Allow from localhost
Allow from 1921681101
Uncomment the following line to permit access from all systems
Allow LOCAL
ltLocationgt
The LOCAL macro is internal to CUPS and specifies the local system This macro
accepts communication from any address that resolves to the local system Specify
Allow LOCAL to share the printer with all systems
Print from WindowsPrint Using CUPS
Modern versions of Windows (2000 and later) support IPP and as a result can communicate
directly with CUPS To use this feature you must have CUPS configured on
the Linux print server to allow remote IPP printing you also need to create a new
printer on the Windows system that points to the IP address of the Linux print server
First set up the etccupscupsdconf file to allow network printing from a client as
explained in ldquoSharing CUPS Printersrdquo
Windows XP From Windows XP go to Control Panel1048644Printers and Faxes and click Add Printer
Click Next in the introductory window and select A network printer or a printer
attached to another computer Click Next Select Connect to a printer on the Internet
or on a home or office network Continue following the next paragraph at
ldquoEnter URLrdquo
Windows 7 From Windows 7 go to Control Panel1048644Devices and Printers and click Add a
printer Click Add a network wireless or Bluetooth printer Assuming Windows
does not find the printer click The printer that I want isnrsquot listed Click the radio
button labeled Select a shared printer by name
Enter URL Enter the following information in the text box (under Windows XP it is labeled URL)
httphostname631printersprinter-name
where hostname is the name or IP address of the Linux CUPS server system and
printer-name is the name of the printer on that system For example for the printer
named dog88 on the system named dog at IP address 192168012 you could enter
httpdog631printersdog88 or http192168012631printersdog88 If you
use a hostname it must be defined in the hosts file on the Windows machine Click
Next Windows requests that you specify the manufacturer and model of printer or
provide a driver for the printer If you supply a printer driver use the Windows version
of the driver
Print Using SambaSamba must be set up so that the Windows user who will be printing is mapped to a
Linux user (including mapping the Windows guest user to the Linux user nobody)
Windows supports printer sharing via SMB which allows a printer to be shared
transparently between Windows systems using the same mechanism as file sharing
Samba allows Windows users to use printers connected to Linux systems just as
they would use any other shared printers
When you use rpm to install Samba it creates a directory named varspoolsamba
that is owned by the root account and that anyone can read from and write to
$ ls -ld varspoolsamba
drwxrwxrwt 2 root root 4096 02-03 1523 varspoolsamba
Under Fedora put the following two lines in the [global] section of the etcsambasmbconf
file Under RHEL these lines are set up by default you need only change the printcap name as
shown
[global]
printing = cups
printcap name = cups
The printerrsquos share is listed in the [printers] section in smbconf In the following
example the path is the path Samba uses as a spool directory and is not a normal
share path The settings allow anyone including guest to use the printer The
[printers] section in the default smbconf file has the following entries which are
appropriate for most setups
[printers]
comment = All Printers
path = varspoolsamba
browseable = no
guest ok = no
writable = no
printable = yes
Printing to WindowsCUPS views a printer on a Windows machine exactly the same way it views any
other printer The only difference is the URI you need to specify when connecting it
To configure a printer connected to a Windows machine click the Administration
tab in the CUPS Web interface and select Add Printer just as you would for a local
printer
When you are asked to select the device choose Windows Printer via SAMBA
Enter the URI of the printer in the following format
smbwindows_systemprinter_name
where windows_system can be an IP address or a hostname After you have added
the printer you can use it as you would any other printer
where IP is the IP address that CUPS accepts connections on port is the port number
that CUPS listens on for connections on IP and path is the pathname of the domain
socket CUPS uses to communicate with printers CUPS typically uses port 631 and by
default binds to localhost Thus it accepts connections from the loopback service of
the local system only CUPS uses varruncupscupssock a local domain socket to
communicate with local printers It can also use a Port directive to specify the port
number it listens to for HTTP requests
$ grep -i listen etccupscupsdconf
Only listen for connections from the local machine
Listen localhost631
Listen varruncupscupssock
To allow other systems to connect to the CUPS server on the local system you must
instruct CUPS to bind to an IP address that the other systems can reach First
remove or comment out the Listen localhost631 directive leave the other Listen
directive in place
Listen localhost631
Listen varruncupscupssock
In place of the commented-out Listen directive use an access control list to permit
only selected machines to connect to local printers An access control list is
defined inside a ltLocationgt container (see page 934 for the Apache equivalent)
The following example allows only the system at IP address 1921681101 and
the local system to print to the specified printer
ltLocation gt
Order AllowDeny
Allow access from the local system and 1921681101
Allow from localhost
Allow from 1921681101
Uncomment the following line to permit access from all systems
Allow LOCAL
ltLocationgt
The LOCAL macro is internal to CUPS and specifies the local system This macro
accepts communication from any address that resolves to the local system Specify
Allow LOCAL to share the printer with all systems
Print from WindowsPrint Using CUPS
Modern versions of Windows (2000 and later) support IPP and as a result can communicate
directly with CUPS To use this feature you must have CUPS configured on
the Linux print server to allow remote IPP printing you also need to create a new
printer on the Windows system that points to the IP address of the Linux print server
First set up the etccupscupsdconf file to allow network printing from a client as
explained in ldquoSharing CUPS Printersrdquo
Windows XP From Windows XP go to Control Panel1048644Printers and Faxes and click Add Printer
Click Next in the introductory window and select A network printer or a printer
attached to another computer Click Next Select Connect to a printer on the Internet
or on a home or office network Continue following the next paragraph at
ldquoEnter URLrdquo
Windows 7 From Windows 7 go to Control Panel1048644Devices and Printers and click Add a
printer Click Add a network wireless or Bluetooth printer Assuming Windows
does not find the printer click The printer that I want isnrsquot listed Click the radio
button labeled Select a shared printer by name
Enter URL Enter the following information in the text box (under Windows XP it is labeled URL)
httphostname631printersprinter-name
where hostname is the name or IP address of the Linux CUPS server system and
printer-name is the name of the printer on that system For example for the printer
named dog88 on the system named dog at IP address 192168012 you could enter
httpdog631printersdog88 or http192168012631printersdog88 If you
use a hostname it must be defined in the hosts file on the Windows machine Click
Next Windows requests that you specify the manufacturer and model of printer or
provide a driver for the printer If you supply a printer driver use the Windows version
of the driver
Print Using SambaSamba must be set up so that the Windows user who will be printing is mapped to a
Linux user (including mapping the Windows guest user to the Linux user nobody)
Windows supports printer sharing via SMB which allows a printer to be shared
transparently between Windows systems using the same mechanism as file sharing
Samba allows Windows users to use printers connected to Linux systems just as
they would use any other shared printers
When you use rpm to install Samba it creates a directory named varspoolsamba
that is owned by the root account and that anyone can read from and write to
$ ls -ld varspoolsamba
drwxrwxrwt 2 root root 4096 02-03 1523 varspoolsamba
Under Fedora put the following two lines in the [global] section of the etcsambasmbconf
file Under RHEL these lines are set up by default you need only change the printcap name as
shown
[global]
printing = cups
printcap name = cups
The printerrsquos share is listed in the [printers] section in smbconf In the following
example the path is the path Samba uses as a spool directory and is not a normal
share path The settings allow anyone including guest to use the printer The
[printers] section in the default smbconf file has the following entries which are
appropriate for most setups
[printers]
comment = All Printers
path = varspoolsamba
browseable = no
guest ok = no
writable = no
printable = yes
Printing to WindowsCUPS views a printer on a Windows machine exactly the same way it views any
other printer The only difference is the URI you need to specify when connecting it
To configure a printer connected to a Windows machine click the Administration
tab in the CUPS Web interface and select Add Printer just as you would for a local
printer
When you are asked to select the device choose Windows Printer via SAMBA
Enter the URI of the printer in the following format
smbwindows_systemprinter_name
where windows_system can be an IP address or a hostname After you have added
the printer you can use it as you would any other printer
$ grep -i listen etccupscupsdconf
Only listen for connections from the local machine
Listen localhost631
Listen varruncupscupssock
To allow other systems to connect to the CUPS server on the local system you must
instruct CUPS to bind to an IP address that the other systems can reach First
remove or comment out the Listen localhost631 directive leave the other Listen
directive in place
Listen localhost631
Listen varruncupscupssock
In place of the commented-out Listen directive use an access control list to permit
only selected machines to connect to local printers An access control list is
defined inside a ltLocationgt container (see page 934 for the Apache equivalent)
The following example allows only the system at IP address 1921681101 and
the local system to print to the specified printer
ltLocation gt
Order AllowDeny
Allow access from the local system and 1921681101
Allow from localhost
Allow from 1921681101
Uncomment the following line to permit access from all systems
Allow LOCAL
ltLocationgt
The LOCAL macro is internal to CUPS and specifies the local system This macro
accepts communication from any address that resolves to the local system Specify
Allow LOCAL to share the printer with all systems
Print from WindowsPrint Using CUPS
Modern versions of Windows (2000 and later) support IPP and as a result can communicate
directly with CUPS To use this feature you must have CUPS configured on
the Linux print server to allow remote IPP printing you also need to create a new
printer on the Windows system that points to the IP address of the Linux print server
First set up the etccupscupsdconf file to allow network printing from a client as
explained in ldquoSharing CUPS Printersrdquo
Windows XP From Windows XP go to Control Panel1048644Printers and Faxes and click Add Printer
Click Next in the introductory window and select A network printer or a printer
attached to another computer Click Next Select Connect to a printer on the Internet
or on a home or office network Continue following the next paragraph at
ldquoEnter URLrdquo
Windows 7 From Windows 7 go to Control Panel1048644Devices and Printers and click Add a
printer Click Add a network wireless or Bluetooth printer Assuming Windows
does not find the printer click The printer that I want isnrsquot listed Click the radio
button labeled Select a shared printer by name
Enter URL Enter the following information in the text box (under Windows XP it is labeled URL)
httphostname631printersprinter-name
where hostname is the name or IP address of the Linux CUPS server system and
printer-name is the name of the printer on that system For example for the printer
named dog88 on the system named dog at IP address 192168012 you could enter
httpdog631printersdog88 or http192168012631printersdog88 If you
use a hostname it must be defined in the hosts file on the Windows machine Click
Next Windows requests that you specify the manufacturer and model of printer or
provide a driver for the printer If you supply a printer driver use the Windows version
of the driver
Print Using SambaSamba must be set up so that the Windows user who will be printing is mapped to a
Linux user (including mapping the Windows guest user to the Linux user nobody)
Windows supports printer sharing via SMB which allows a printer to be shared
transparently between Windows systems using the same mechanism as file sharing
Samba allows Windows users to use printers connected to Linux systems just as
they would use any other shared printers
When you use rpm to install Samba it creates a directory named varspoolsamba
that is owned by the root account and that anyone can read from and write to
$ ls -ld varspoolsamba
drwxrwxrwt 2 root root 4096 02-03 1523 varspoolsamba
Under Fedora put the following two lines in the [global] section of the etcsambasmbconf
file Under RHEL these lines are set up by default you need only change the printcap name as
shown
[global]
printing = cups
printcap name = cups
The printerrsquos share is listed in the [printers] section in smbconf In the following
example the path is the path Samba uses as a spool directory and is not a normal
share path The settings allow anyone including guest to use the printer The
[printers] section in the default smbconf file has the following entries which are
appropriate for most setups
[printers]
comment = All Printers
path = varspoolsamba
browseable = no
guest ok = no
writable = no
printable = yes
Printing to WindowsCUPS views a printer on a Windows machine exactly the same way it views any
other printer The only difference is the URI you need to specify when connecting it
To configure a printer connected to a Windows machine click the Administration
tab in the CUPS Web interface and select Add Printer just as you would for a local
printer
When you are asked to select the device choose Windows Printer via SAMBA
Enter the URI of the printer in the following format
smbwindows_systemprinter_name
where windows_system can be an IP address or a hostname After you have added
the printer you can use it as you would any other printer
To allow other systems to connect to the CUPS server on the local system you must
instruct CUPS to bind to an IP address that the other systems can reach First
remove or comment out the Listen localhost631 directive leave the other Listen
directive in place
Listen localhost631
Listen varruncupscupssock
In place of the commented-out Listen directive use an access control list to permit
only selected machines to connect to local printers An access control list is
defined inside a ltLocationgt container (see page 934 for the Apache equivalent)
The following example allows only the system at IP address 1921681101 and
the local system to print to the specified printer
ltLocation gt
Order AllowDeny
Allow access from the local system and 1921681101
Allow from localhost
Allow from 1921681101
Uncomment the following line to permit access from all systems
Allow LOCAL
ltLocationgt
The LOCAL macro is internal to CUPS and specifies the local system This macro
accepts communication from any address that resolves to the local system Specify
Allow LOCAL to share the printer with all systems
Print from WindowsPrint Using CUPS
Modern versions of Windows (2000 and later) support IPP and as a result can communicate
directly with CUPS To use this feature you must have CUPS configured on
the Linux print server to allow remote IPP printing you also need to create a new
printer on the Windows system that points to the IP address of the Linux print server
First set up the etccupscupsdconf file to allow network printing from a client as
explained in ldquoSharing CUPS Printersrdquo
Windows XP From Windows XP go to Control Panel1048644Printers and Faxes and click Add Printer
Click Next in the introductory window and select A network printer or a printer
attached to another computer Click Next Select Connect to a printer on the Internet
or on a home or office network Continue following the next paragraph at
ldquoEnter URLrdquo
Windows 7 From Windows 7 go to Control Panel1048644Devices and Printers and click Add a
printer Click Add a network wireless or Bluetooth printer Assuming Windows
does not find the printer click The printer that I want isnrsquot listed Click the radio
button labeled Select a shared printer by name
Enter URL Enter the following information in the text box (under Windows XP it is labeled URL)
httphostname631printersprinter-name
where hostname is the name or IP address of the Linux CUPS server system and
printer-name is the name of the printer on that system For example for the printer
named dog88 on the system named dog at IP address 192168012 you could enter
httpdog631printersdog88 or http192168012631printersdog88 If you
use a hostname it must be defined in the hosts file on the Windows machine Click
Next Windows requests that you specify the manufacturer and model of printer or
provide a driver for the printer If you supply a printer driver use the Windows version
of the driver
Print Using SambaSamba must be set up so that the Windows user who will be printing is mapped to a
Linux user (including mapping the Windows guest user to the Linux user nobody)
Windows supports printer sharing via SMB which allows a printer to be shared
transparently between Windows systems using the same mechanism as file sharing
Samba allows Windows users to use printers connected to Linux systems just as
they would use any other shared printers
When you use rpm to install Samba it creates a directory named varspoolsamba
that is owned by the root account and that anyone can read from and write to
$ ls -ld varspoolsamba
drwxrwxrwt 2 root root 4096 02-03 1523 varspoolsamba
Under Fedora put the following two lines in the [global] section of the etcsambasmbconf
file Under RHEL these lines are set up by default you need only change the printcap name as
shown
[global]
printing = cups
printcap name = cups
The printerrsquos share is listed in the [printers] section in smbconf In the following
example the path is the path Samba uses as a spool directory and is not a normal
share path The settings allow anyone including guest to use the printer The
[printers] section in the default smbconf file has the following entries which are
appropriate for most setups
[printers]
comment = All Printers
path = varspoolsamba
browseable = no
guest ok = no
writable = no
printable = yes
Printing to WindowsCUPS views a printer on a Windows machine exactly the same way it views any
other printer The only difference is the URI you need to specify when connecting it
To configure a printer connected to a Windows machine click the Administration
tab in the CUPS Web interface and select Add Printer just as you would for a local
printer
When you are asked to select the device choose Windows Printer via SAMBA
Enter the URI of the printer in the following format
smbwindows_systemprinter_name
where windows_system can be an IP address or a hostname After you have added
the printer you can use it as you would any other printer
defined inside a ltLocationgt container (see page 934 for the Apache equivalent)
The following example allows only the system at IP address 1921681101 and
the local system to print to the specified printer
ltLocation gt
Order AllowDeny
Allow access from the local system and 1921681101
Allow from localhost
Allow from 1921681101
Uncomment the following line to permit access from all systems
Allow LOCAL
ltLocationgt
The LOCAL macro is internal to CUPS and specifies the local system This macro
accepts communication from any address that resolves to the local system Specify
Allow LOCAL to share the printer with all systems
Print from WindowsPrint Using CUPS
Modern versions of Windows (2000 and later) support IPP and as a result can communicate
directly with CUPS To use this feature you must have CUPS configured on
the Linux print server to allow remote IPP printing you also need to create a new
printer on the Windows system that points to the IP address of the Linux print server
First set up the etccupscupsdconf file to allow network printing from a client as
explained in ldquoSharing CUPS Printersrdquo
Windows XP From Windows XP go to Control Panel1048644Printers and Faxes and click Add Printer
Click Next in the introductory window and select A network printer or a printer
attached to another computer Click Next Select Connect to a printer on the Internet
or on a home or office network Continue following the next paragraph at
ldquoEnter URLrdquo
Windows 7 From Windows 7 go to Control Panel1048644Devices and Printers and click Add a
printer Click Add a network wireless or Bluetooth printer Assuming Windows
does not find the printer click The printer that I want isnrsquot listed Click the radio
button labeled Select a shared printer by name
Enter URL Enter the following information in the text box (under Windows XP it is labeled URL)
httphostname631printersprinter-name
where hostname is the name or IP address of the Linux CUPS server system and
printer-name is the name of the printer on that system For example for the printer
named dog88 on the system named dog at IP address 192168012 you could enter
httpdog631printersdog88 or http192168012631printersdog88 If you
use a hostname it must be defined in the hosts file on the Windows machine Click
Next Windows requests that you specify the manufacturer and model of printer or
provide a driver for the printer If you supply a printer driver use the Windows version
of the driver
Print Using SambaSamba must be set up so that the Windows user who will be printing is mapped to a
Linux user (including mapping the Windows guest user to the Linux user nobody)
Windows supports printer sharing via SMB which allows a printer to be shared
transparently between Windows systems using the same mechanism as file sharing
Samba allows Windows users to use printers connected to Linux systems just as
they would use any other shared printers
When you use rpm to install Samba it creates a directory named varspoolsamba
that is owned by the root account and that anyone can read from and write to
$ ls -ld varspoolsamba
drwxrwxrwt 2 root root 4096 02-03 1523 varspoolsamba
Under Fedora put the following two lines in the [global] section of the etcsambasmbconf
file Under RHEL these lines are set up by default you need only change the printcap name as
shown
[global]
printing = cups
printcap name = cups
The printerrsquos share is listed in the [printers] section in smbconf In the following
example the path is the path Samba uses as a spool directory and is not a normal
share path The settings allow anyone including guest to use the printer The
[printers] section in the default smbconf file has the following entries which are
appropriate for most setups
[printers]
comment = All Printers
path = varspoolsamba
browseable = no
guest ok = no
writable = no
printable = yes
Printing to WindowsCUPS views a printer on a Windows machine exactly the same way it views any
other printer The only difference is the URI you need to specify when connecting it
To configure a printer connected to a Windows machine click the Administration
tab in the CUPS Web interface and select Add Printer just as you would for a local
printer
When you are asked to select the device choose Windows Printer via SAMBA
Enter the URI of the printer in the following format
smbwindows_systemprinter_name
where windows_system can be an IP address or a hostname After you have added
the printer you can use it as you would any other printer
Print from WindowsPrint Using CUPS
Modern versions of Windows (2000 and later) support IPP and as a result can communicate
directly with CUPS To use this feature you must have CUPS configured on
the Linux print server to allow remote IPP printing you also need to create a new
printer on the Windows system that points to the IP address of the Linux print server
First set up the etccupscupsdconf file to allow network printing from a client as
explained in ldquoSharing CUPS Printersrdquo
Windows XP From Windows XP go to Control Panel1048644Printers and Faxes and click Add Printer
Click Next in the introductory window and select A network printer or a printer
attached to another computer Click Next Select Connect to a printer on the Internet
or on a home or office network Continue following the next paragraph at
ldquoEnter URLrdquo
Windows 7 From Windows 7 go to Control Panel1048644Devices and Printers and click Add a
printer Click Add a network wireless or Bluetooth printer Assuming Windows
does not find the printer click The printer that I want isnrsquot listed Click the radio
button labeled Select a shared printer by name
Enter URL Enter the following information in the text box (under Windows XP it is labeled URL)
httphostname631printersprinter-name
where hostname is the name or IP address of the Linux CUPS server system and
printer-name is the name of the printer on that system For example for the printer
named dog88 on the system named dog at IP address 192168012 you could enter
httpdog631printersdog88 or http192168012631printersdog88 If you
use a hostname it must be defined in the hosts file on the Windows machine Click
Next Windows requests that you specify the manufacturer and model of printer or
provide a driver for the printer If you supply a printer driver use the Windows version
of the driver
Print Using SambaSamba must be set up so that the Windows user who will be printing is mapped to a
Linux user (including mapping the Windows guest user to the Linux user nobody)
Windows supports printer sharing via SMB which allows a printer to be shared
transparently between Windows systems using the same mechanism as file sharing
Samba allows Windows users to use printers connected to Linux systems just as
they would use any other shared printers
When you use rpm to install Samba it creates a directory named varspoolsamba
that is owned by the root account and that anyone can read from and write to
$ ls -ld varspoolsamba
drwxrwxrwt 2 root root 4096 02-03 1523 varspoolsamba
Under Fedora put the following two lines in the [global] section of the etcsambasmbconf
file Under RHEL these lines are set up by default you need only change the printcap name as
shown
[global]
printing = cups
printcap name = cups
The printerrsquos share is listed in the [printers] section in smbconf In the following
example the path is the path Samba uses as a spool directory and is not a normal
share path The settings allow anyone including guest to use the printer The
[printers] section in the default smbconf file has the following entries which are
appropriate for most setups
[printers]
comment = All Printers
path = varspoolsamba
browseable = no
guest ok = no
writable = no
printable = yes
Printing to WindowsCUPS views a printer on a Windows machine exactly the same way it views any
other printer The only difference is the URI you need to specify when connecting it
To configure a printer connected to a Windows machine click the Administration
tab in the CUPS Web interface and select Add Printer just as you would for a local
printer
When you are asked to select the device choose Windows Printer via SAMBA
Enter the URI of the printer in the following format
smbwindows_systemprinter_name
where windows_system can be an IP address or a hostname After you have added
the printer you can use it as you would any other printer
Windows XP From Windows XP go to Control Panel1048644Printers and Faxes and click Add Printer
Click Next in the introductory window and select A network printer or a printer
attached to another computer Click Next Select Connect to a printer on the Internet
or on a home or office network Continue following the next paragraph at
ldquoEnter URLrdquo
Windows 7 From Windows 7 go to Control Panel1048644Devices and Printers and click Add a
printer Click Add a network wireless or Bluetooth printer Assuming Windows
does not find the printer click The printer that I want isnrsquot listed Click the radio
button labeled Select a shared printer by name
Enter URL Enter the following information in the text box (under Windows XP it is labeled URL)
httphostname631printersprinter-name
where hostname is the name or IP address of the Linux CUPS server system and
printer-name is the name of the printer on that system For example for the printer
named dog88 on the system named dog at IP address 192168012 you could enter
httpdog631printersdog88 or http192168012631printersdog88 If you
use a hostname it must be defined in the hosts file on the Windows machine Click
Next Windows requests that you specify the manufacturer and model of printer or
provide a driver for the printer If you supply a printer driver use the Windows version
of the driver
Print Using SambaSamba must be set up so that the Windows user who will be printing is mapped to a
Linux user (including mapping the Windows guest user to the Linux user nobody)
Windows supports printer sharing via SMB which allows a printer to be shared
transparently between Windows systems using the same mechanism as file sharing
Samba allows Windows users to use printers connected to Linux systems just as
they would use any other shared printers
When you use rpm to install Samba it creates a directory named varspoolsamba
that is owned by the root account and that anyone can read from and write to
$ ls -ld varspoolsamba
drwxrwxrwt 2 root root 4096 02-03 1523 varspoolsamba
Under Fedora put the following two lines in the [global] section of the etcsambasmbconf
file Under RHEL these lines are set up by default you need only change the printcap name as
shown
[global]
printing = cups
printcap name = cups
The printerrsquos share is listed in the [printers] section in smbconf In the following
example the path is the path Samba uses as a spool directory and is not a normal
share path The settings allow anyone including guest to use the printer The
[printers] section in the default smbconf file has the following entries which are
appropriate for most setups
[printers]
comment = All Printers
path = varspoolsamba
browseable = no
guest ok = no
writable = no
printable = yes
Printing to WindowsCUPS views a printer on a Windows machine exactly the same way it views any
other printer The only difference is the URI you need to specify when connecting it
To configure a printer connected to a Windows machine click the Administration
tab in the CUPS Web interface and select Add Printer just as you would for a local
printer
When you are asked to select the device choose Windows Printer via SAMBA
Enter the URI of the printer in the following format
smbwindows_systemprinter_name
where windows_system can be an IP address or a hostname After you have added
the printer you can use it as you would any other printer
Windows 7 From Windows 7 go to Control Panel1048644Devices and Printers and click Add a
printer Click Add a network wireless or Bluetooth printer Assuming Windows
does not find the printer click The printer that I want isnrsquot listed Click the radio
button labeled Select a shared printer by name
Enter URL Enter the following information in the text box (under Windows XP it is labeled URL)
httphostname631printersprinter-name
where hostname is the name or IP address of the Linux CUPS server system and
printer-name is the name of the printer on that system For example for the printer
named dog88 on the system named dog at IP address 192168012 you could enter
httpdog631printersdog88 or http192168012631printersdog88 If you
use a hostname it must be defined in the hosts file on the Windows machine Click
Next Windows requests that you specify the manufacturer and model of printer or
provide a driver for the printer If you supply a printer driver use the Windows version
of the driver
Print Using SambaSamba must be set up so that the Windows user who will be printing is mapped to a
Linux user (including mapping the Windows guest user to the Linux user nobody)
Windows supports printer sharing via SMB which allows a printer to be shared
transparently between Windows systems using the same mechanism as file sharing
Samba allows Windows users to use printers connected to Linux systems just as
they would use any other shared printers
When you use rpm to install Samba it creates a directory named varspoolsamba
that is owned by the root account and that anyone can read from and write to
$ ls -ld varspoolsamba
drwxrwxrwt 2 root root 4096 02-03 1523 varspoolsamba
Under Fedora put the following two lines in the [global] section of the etcsambasmbconf
file Under RHEL these lines are set up by default you need only change the printcap name as
shown
[global]
printing = cups
printcap name = cups
The printerrsquos share is listed in the [printers] section in smbconf In the following
example the path is the path Samba uses as a spool directory and is not a normal
share path The settings allow anyone including guest to use the printer The
[printers] section in the default smbconf file has the following entries which are
appropriate for most setups
[printers]
comment = All Printers
path = varspoolsamba
browseable = no
guest ok = no
writable = no
printable = yes
Printing to WindowsCUPS views a printer on a Windows machine exactly the same way it views any
other printer The only difference is the URI you need to specify when connecting it
To configure a printer connected to a Windows machine click the Administration
tab in the CUPS Web interface and select Add Printer just as you would for a local
printer
When you are asked to select the device choose Windows Printer via SAMBA
Enter the URI of the printer in the following format
smbwindows_systemprinter_name
where windows_system can be an IP address or a hostname After you have added
the printer you can use it as you would any other printer
Enter URL Enter the following information in the text box (under Windows XP it is labeled URL)
httphostname631printersprinter-name
where hostname is the name or IP address of the Linux CUPS server system and
printer-name is the name of the printer on that system For example for the printer
named dog88 on the system named dog at IP address 192168012 you could enter
httpdog631printersdog88 or http192168012631printersdog88 If you
use a hostname it must be defined in the hosts file on the Windows machine Click
Next Windows requests that you specify the manufacturer and model of printer or
provide a driver for the printer If you supply a printer driver use the Windows version
of the driver
Print Using SambaSamba must be set up so that the Windows user who will be printing is mapped to a
Linux user (including mapping the Windows guest user to the Linux user nobody)
Windows supports printer sharing via SMB which allows a printer to be shared
transparently between Windows systems using the same mechanism as file sharing
Samba allows Windows users to use printers connected to Linux systems just as
they would use any other shared printers
When you use rpm to install Samba it creates a directory named varspoolsamba
that is owned by the root account and that anyone can read from and write to
$ ls -ld varspoolsamba
drwxrwxrwt 2 root root 4096 02-03 1523 varspoolsamba
Under Fedora put the following two lines in the [global] section of the etcsambasmbconf
file Under RHEL these lines are set up by default you need only change the printcap name as
shown
[global]
printing = cups
printcap name = cups
The printerrsquos share is listed in the [printers] section in smbconf In the following
example the path is the path Samba uses as a spool directory and is not a normal
share path The settings allow anyone including guest to use the printer The
[printers] section in the default smbconf file has the following entries which are
appropriate for most setups
[printers]
comment = All Printers
path = varspoolsamba
browseable = no
guest ok = no
writable = no
printable = yes
Printing to WindowsCUPS views a printer on a Windows machine exactly the same way it views any
other printer The only difference is the URI you need to specify when connecting it
To configure a printer connected to a Windows machine click the Administration
tab in the CUPS Web interface and select Add Printer just as you would for a local
printer
When you are asked to select the device choose Windows Printer via SAMBA
Enter the URI of the printer in the following format
smbwindows_systemprinter_name
where windows_system can be an IP address or a hostname After you have added
the printer you can use it as you would any other printer
Print Using SambaSamba must be set up so that the Windows user who will be printing is mapped to a
Linux user (including mapping the Windows guest user to the Linux user nobody)
Windows supports printer sharing via SMB which allows a printer to be shared
transparently between Windows systems using the same mechanism as file sharing
Samba allows Windows users to use printers connected to Linux systems just as
they would use any other shared printers
When you use rpm to install Samba it creates a directory named varspoolsamba
that is owned by the root account and that anyone can read from and write to
$ ls -ld varspoolsamba
drwxrwxrwt 2 root root 4096 02-03 1523 varspoolsamba
Under Fedora put the following two lines in the [global] section of the etcsambasmbconf
file Under RHEL these lines are set up by default you need only change the printcap name as
shown
[global]
printing = cups
printcap name = cups
The printerrsquos share is listed in the [printers] section in smbconf In the following
example the path is the path Samba uses as a spool directory and is not a normal
share path The settings allow anyone including guest to use the printer The
[printers] section in the default smbconf file has the following entries which are
appropriate for most setups
[printers]
comment = All Printers
path = varspoolsamba
browseable = no
guest ok = no
writable = no
printable = yes
Printing to WindowsCUPS views a printer on a Windows machine exactly the same way it views any
other printer The only difference is the URI you need to specify when connecting it
To configure a printer connected to a Windows machine click the Administration
tab in the CUPS Web interface and select Add Printer just as you would for a local
printer
When you are asked to select the device choose Windows Printer via SAMBA
Enter the URI of the printer in the following format
smbwindows_systemprinter_name
where windows_system can be an IP address or a hostname After you have added
the printer you can use it as you would any other printer
When you use rpm to install Samba it creates a directory named varspoolsamba
that is owned by the root account and that anyone can read from and write to
$ ls -ld varspoolsamba
drwxrwxrwt 2 root root 4096 02-03 1523 varspoolsamba
Under Fedora put the following two lines in the [global] section of the etcsambasmbconf
file Under RHEL these lines are set up by default you need only change the printcap name as
shown
[global]
printing = cups
printcap name = cups
The printerrsquos share is listed in the [printers] section in smbconf In the following
example the path is the path Samba uses as a spool directory and is not a normal
share path The settings allow anyone including guest to use the printer The
[printers] section in the default smbconf file has the following entries which are
appropriate for most setups
[printers]
comment = All Printers
path = varspoolsamba
browseable = no
guest ok = no
writable = no
printable = yes
Printing to WindowsCUPS views a printer on a Windows machine exactly the same way it views any
other printer The only difference is the URI you need to specify when connecting it
To configure a printer connected to a Windows machine click the Administration
tab in the CUPS Web interface and select Add Printer just as you would for a local
printer
When you are asked to select the device choose Windows Printer via SAMBA
Enter the URI of the printer in the following format
smbwindows_systemprinter_name
where windows_system can be an IP address or a hostname After you have added
the printer you can use it as you would any other printer
Under Fedora put the following two lines in the [global] section of the etcsambasmbconf
file Under RHEL these lines are set up by default you need only change the printcap name as
shown
[global]
printing = cups
printcap name = cups
The printerrsquos share is listed in the [printers] section in smbconf In the following
example the path is the path Samba uses as a spool directory and is not a normal
share path The settings allow anyone including guest to use the printer The
[printers] section in the default smbconf file has the following entries which are
appropriate for most setups
[printers]
comment = All Printers
path = varspoolsamba
browseable = no
guest ok = no
writable = no
printable = yes
Printing to WindowsCUPS views a printer on a Windows machine exactly the same way it views any
other printer The only difference is the URI you need to specify when connecting it
To configure a printer connected to a Windows machine click the Administration
tab in the CUPS Web interface and select Add Printer just as you would for a local
printer
When you are asked to select the device choose Windows Printer via SAMBA
Enter the URI of the printer in the following format
smbwindows_systemprinter_name
where windows_system can be an IP address or a hostname After you have added
the printer you can use it as you would any other printer
The printerrsquos share is listed in the [printers] section in smbconf In the following
example the path is the path Samba uses as a spool directory and is not a normal
share path The settings allow anyone including guest to use the printer The
[printers] section in the default smbconf file has the following entries which are
appropriate for most setups
[printers]
comment = All Printers
path = varspoolsamba
browseable = no
guest ok = no
writable = no
printable = yes
Printing to WindowsCUPS views a printer on a Windows machine exactly the same way it views any
other printer The only difference is the URI you need to specify when connecting it
To configure a printer connected to a Windows machine click the Administration
tab in the CUPS Web interface and select Add Printer just as you would for a local
printer
When you are asked to select the device choose Windows Printer via SAMBA
Enter the URI of the printer in the following format
smbwindows_systemprinter_name
where windows_system can be an IP address or a hostname After you have added
the printer you can use it as you would any other printer
[printers]
comment = All Printers
path = varspoolsamba
browseable = no
guest ok = no
writable = no
printable = yes
Printing to WindowsCUPS views a printer on a Windows machine exactly the same way it views any
other printer The only difference is the URI you need to specify when connecting it
To configure a printer connected to a Windows machine click the Administration
tab in the CUPS Web interface and select Add Printer just as you would for a local
printer
When you are asked to select the device choose Windows Printer via SAMBA
Enter the URI of the printer in the following format
smbwindows_systemprinter_name
where windows_system can be an IP address or a hostname After you have added
the printer you can use it as you would any other printer
Printing to WindowsCUPS views a printer on a Windows machine exactly the same way it views any
other printer The only difference is the URI you need to specify when connecting it
To configure a printer connected to a Windows machine click the Administration
tab in the CUPS Web interface and select Add Printer just as you would for a local
printer
When you are asked to select the device choose Windows Printer via SAMBA
Enter the URI of the printer in the following format
smbwindows_systemprinter_name
where windows_system can be an IP address or a hostname After you have added
the printer you can use it as you would any other printer
When you are asked to select the device choose Windows Printer via SAMBA
Enter the URI of the printer in the following format
smbwindows_systemprinter_name
where windows_system can be an IP address or a hostname After you have added
the printer you can use it as you would any other printer