Add Existing Printer to Cups Web Interface

Add Existing Printer to Cups Web Interface

This article contains education on sharing printers from a GNU/Linux system.

Client support
Protocol Linux Windows macOS
Discovery (DNS-SD/mDNS) CUPS
with
Avahi
Native support since
Windows x
Bonjour
Internet Printing Protocol CUPS Command Panel > Programs > Plow Windows features on or off > Impress and Document Services > Internet Printing Client Native back up
SMB
shared printer
Samba
with
CUPS
Native back up Native back up
Line Printer Daemon protocol CUPS Command Console > Programs > Turn Windows features on or off > Print services >

LPD Print Service
and
LPR Port Monitor
Native support

Creating class for multiple printers

In CUPS, a class is a group of printers which appears to clients as a single printer. When a client selects to print to the course, CUPS selects any printer in the grouping to accept the impress task. This may be particularly useful when i printer from the class must be removed. If it is excluded from the form, end users will not notice any alter because the impress job volition be queued to another printer in the class. Creating and managing classes can be done from CUPS Spider web GUI.

Printer sharing


Tango-view-fullscreen.png

This article or section needs expansion.

Tango-view-fullscreen.png

DNS-SD advertisement

To denote the printer to the network over DNS-SD/mDNS (Bonjour in Apple tree world),
Avahi
must exist installed and running on the server.

To enable information technology, either select
Share printers continued to this system
in the web interface, or manually set
Browsing On
in
/etc/cups/cupsd.conf:

/etc/cups/cupsd.conf
... Browsing On ...
      

Afterwards
restart
cups.service.

Annotation that “browsing” at the print server is a different matter from “browsing” at a remote networked host. On the print server,
cupsd
provides the DNS-SD protocol support which the
avahi-daemon
broadcasts. The
cups-browsed
service is unnecessary on the print server, unless besides dissemination the old CUPS protocol, or the print server is as well “browsing” for other networked printers. On the remote networked host, the
cups-browsed
service is
required
to “scan” for network broadcasts of print services, and running
cups-browsed
will also automatically start
cupsd.

The
cups.service
service will exist automatically started when a USB printer is plugged in, withal this may not be the case for other connexion types. If
cups.service
is not running,
avahi-daemon
does not broadcast the print services, and then in that instance the systemd unit of measurement service file must be modified to get-go on boot, and and then the service must again be “enabled/installed” with the new dependency. To do this,
edit
the service file
[Install]
department to add a
WantedBy=default.target
dependency, and so
enable
and
get-go
the
cups.service
service.

Read:  Cara Mengatasi Printer Canon Kedip 5 Kali

Sharing via Cyberspace Printing Protocol

The server tin be configured using either the web interface or by manually editing
/etc/cups/cupsd.conf.

Open up upwards the spider web interface to the server, select the
Assistants
tab, expect under the
Server
heading, and enable the “Share printers connected to this system” option. Save your alter past clicking on the
Change Settings
push. The server will automatically restart.

On the server calculator (the one directly connected to the printer), permit access to the server by modifying the location directive. For instance:

/etc/cups/cupsd.conf
<Location />     Gild let,deny     Allow localhost     Allow 192.168.0.* </Location> ...
      

Also brand sure the server is listening on the IP accost the client will utilise:

/etc/cups/cupsd.conf
... Mind <hostname>:631 ...
      

There are more configuration possibilities, including automatic methods, which are described in item in
Using Network Printers
and

cupsd.conf(5)
.

Later on making any modifications,
restart
cups.service.

If CUPS is started using socket activation, create a
driblet-in snippet
for
cups.socket
and so that socket activation also works for remote connections:

/etc/systemd/organisation/cups.socket.d/override.conf
[Socket] ListenStream=631

Sharing via Samba

Samba
is an implementation of the Windows file and printer sharing protocols, even the most vintage ones.

To configure Samba on the Linux server, edit
/etc/samba/smb.conf
file to allow admission to printers. File
smb.conf
can look something like this:

/etc/samba/smb.conf
[global] ... printing = CUPS ...  [printers]     comment = All Printers     path = /var/spool/samba     browseable = yes     # to allow user 'guest account' to print.     guest ok = no     writable = no     printable = yes     create mode = 0700     write list = root @adm @wheel
        yourusername
      

That should be enough to share the printer, all the same adding an individual printer entry may be desirable:

/etc/samba/smb.conf
[ML1250]     comment = Samsung ML-1250 Light amplification by stimulated emission of radiation Printer     printer = ml1250     path = /var/spool/samba     printing = cups     printable = yes     user client driver = yes     # to allow user 'guest account' to impress.     guest ok = no     writable = no     write list = root @adm @wheel
        yourusername
        valid users = root @adm @wheel
        yourusername
      

Delight note that this assumes configuration was made and then that users must have a valid account to access the printer. To have a public printer, set
invitee ok
to
aye, and remove the
valid users
line. To add accounts, fix a regular GNU/Linux account and and then ready a Samba password on the server. Run into
Samba#User direction.

Read:  Cara Mengatasi Printer Canon Ip 2770 Kedap Kedip

Afterward this,
restart
smb.service
and
nmb.service.

Meet Samba’due south documentation
Setting upward Samba every bit a Print Server
for more than details.

Sharing via Line Printer Daemon protocol

Warning:
cups-lpd
does not perform whatever admission control based on the settings in
/etc/cups/cupsd.conf. Therefore, running
cups-lpd
on your server volition allow whatsoever computer on your network (and perhaps the entire Internet) to print to your server.

Enable
and
showtime
cups-lpd.socket.

Remote assistants

Once the server is set up equally described in
#Printer sharing, it tin besides be configured so that information technology can exist remotely administered. Add the allowed hosts to the
<Location /admin>
block in
/etc/cups/cupsd.conf, using the same syntax as described in
#Sharing via Internet Printing Protocol. Note that 3 levels of access can be granted:

<Location />           #access to the server <Location /admin>	#access to the admin pages <Location /admin/conf>	#access to configuration files
      

To give remote hosts admission to i of these levels, add together an
Allow
statement to that level’due south section. An
Allow
argument can take i or more of the forms listed below:

Allow from all Allow from host.domain.com Allow from *.domain.com Allow from ip-address Allow from ip-address/netmask Let from @LOCAL
      

Deny statements can also be used. For example, to give total access to all hosts on your local network interfaces, edit
/etc/cups/cupsd.conf
to include this:

# Restrict access to the server... # Past default but localhost connections are possible <Location />    Lodge allow,deny
        Allow from @LOCAL
        </Location>  # Restrict access to the admin pages... <Location /admin>    Lodge allow,deny
        Let from @LOCAL
        </Location>  # Restrict admission to configuration files... <Location /admin/conf>    AuthType Basic    Require user @SYSTEM    Gild allow,deny
        Allow from @LOCAL
        </Location>
      

Yous might as well need to disable the HTTPS requirement, when using the default self-signed certificate generated by CUPS:

Read:  Cara Sharing Printer Windows 10 Dengan Lan

DefaultEncryption IfRequested
      

This should avoid the mistake: 426 – Upgrade Required when using the CUPS spider web interface from a remote machine.

Kerberos

Kerberos
can be used to cosign users accessing a remote CUPS server. This assumes that your machine has a keytab and it will need a ticket for “HTTP”. Instead of using
http://localhost:631
you must apply
https://host.example.co.uk:631
– encryption is required for auth (hence https) and the full hostname is needed so that Kerberos/Negotiate tin can piece of work. In improver, the server must be configured in
/etc/cups/cupsd.conf
to apply a
DefaultAuthType
of
Negotiate.

If you are using
Samba‘due south winbind NSS support, y’all can add an Advertizement group name to
/etc/cups/cups-files.conf
– in the following example
sysadmin
might be an AD group:

SystemGroup sys root sysadmin
      

Troubleshooting

See
CUPS/Troubleshooting
for full general troubleshooting tips.

Cannot print with GTK applications

If you become a
getting printer information failed
message when you endeavour to print from GTK applications, add together this line to your
/etc/hosts:

serverip 	some.name.org 	ServersHostname
      

Permission errors on Windows

Some users fixed
NT_STATUS_ACCESS_DENIED
(Windows clients) errors by using a slightly different syntax:

smb://workgroup/username:password@hostname/printer_name
      

Other operating systems

More than data on interfacing CUPS with other printing systems can be found in the CUPS manual, e.thousand. on
http://localhost:631/aid/network.html.



Add Existing Printer to Cups Web Interface

You May Also Like