Ir al contenido principal

How to install CUPS Raspberry Pi Debian

 

You probably have a few Linux machines in your data center that have a few CPU cycles to spare. Why not make use of them for a printer server? After all, most businesses still rely on printing for certain departments. When your business is large enough to require a print server, you might as well go with a tried and true system: Linux.

I'm going to walk you through setting up a print server on Debian Server, using CUPS and Avahi. This process shouldn't be difficult and, in the end, you'll have a reliable printer server ready to go.

How to install CUPS

The first thing we need to do is install the CUPS package. Log in to your Ubuntu Server in the data center and issue the command:

sudo apt-get install cups -y

Once the installation completes, start and enable the CUPS service with the command:

sudo systemctl start cups
sudo systemctl enable cups

How to configure CUPS

Now that CUPS is installed and running, we need to make a few configuration changes. To open the CUPS configuration file, issue the command:

sudo nano /etc/cups/cupsd.conf

First look for the line:

Browsing Off

Change that line to:

Browsing On

Next, we'll want to be able to access the web-based dashboard. To to this, look for the line:

Listen localhost:631

Change that line to:

Port 631

We also need to make sure that CUPS is listening on all interfaces. To do that, look for the section:

<Location />
  Order allow,deny
</Location>

Change the above section to:

<Location />
  Order allow,deny
  Allow @LOCAL
</Location>

You might also want to add access to the web-based Admin console. To do this, look for the section:

<Location /admin>
  Order allow,deny
</Location>

Change that section to:

<Location /admin>
  AuthType Default
  Require valid-user
  Order allow,deny
  Allow @LOCAL
</Location>

Save and close the file.

Restart the CUPS daemon with the command:

sudo systemctl restart cups

How to share via the Bonjour and IPP protocols

Now we're going to make sure the printer is shared out to your network using the Bonjour and IPP protocols. First we need to install the avahi daemon with the command:

sudo apt install avahi-daemon -y

Next, start and enable the avahi daemon with the commands:

sudo systemctl start avahi-daemon
sudo systemctl enable avahi-daemon

If you have the UFW firewall enabled, make sure to open the necessary port with the command:

sudo ufw allow 5353/udp

How to connect to the printer

At this point, your new printer should be available to add to the desktops that need it. How you add the printer will depend on the desktop operating system you are using. For example, with Pop!_OS Linux, I can open up the Add Printer window from Settings | Devices and the new printer automatically appears

 

At this point, your printer should be added to the desktop and able to print. Should you need to, you can manage both the printer and the server from the web-based console by pointing a browser to http://SERVER_IP:631. The admin console is at the address https://SERVER_IP:631/admin (where SERVER_IP is the IP address of the hosting server). For the admin console, you'll be prompted for a valid username and password. 

How to lock down the admin console

It is important to understand that any user on the Linux server can access that console. If you want to lock it down a bit tighter, you could change the line (in /etc/cups/cupsd.conf):

Require valid-user

to

Require user @SYSTEM

You would then have to create a new user and add them to the lpadmin group with the command:

sudo useradd -g lpadmin cupsadmin

Set a password for the cupsadmin user with the command:

sudo passwd cupsadmin

You should then be able to log in to the admin console with the user cupsadmin and the password you just set.

Using this setup is a cost-effective way of adding a print server to your data center--or anywhere within your business. 

Author:  https://www.techrepublic.com/article/how-to-configure-a-print-server-with-ubuntu-server-cups-and-bonjour/

Comentarios

Entradas más populares de este blog

BBS - Boletin Board Sistem

Antes de que Internet fuera tan grande y Google todavía no existía! Teníamos los BBS Eran Personas que tenían sus computadoras prendidas con sistemas para recibir llamadas. Te contestaba por medio de tu modem Dial UP uff tenia un 9600 en ese tiempo y una 8086 con DOS me conectaba a FileGallery para poder pegar al Internet que tiempos... En Puerto Rico tuvimos 42 BBS de los que visite por Dial-UP http://bbslist.textfiles.com/787/ Ya casi no existen pero me gustaria algundia toparme con alguno de los sysop. BBS Existentes en Puerto Rico bbs.thewallbbs.com bbs.efectolinux.com tiene DIALUPy trabaja:)

DOH cloudflare dns on Mikrotik V7

Protecting home Internet connections from malware With home Internet usage on the rise, it’s never been more important to protect your family from dangerous and malicious sites. 1.1.1.1 for Families is built on top of the same site categorization and filtering technology that powers Cloudflare’s enterprise products. It uses Cloudflare’s Internet intelligence to filter content on your home Internet network.