Installing CUPS service, how to access its config page?

Robert Heller heller at deepsoft.com
Sat Nov 11 17:24:01 UTC 2023


At Sat, 11 Nov 2023 10:50:37 -0600 "Ubuntu user technical support,? not for general discussions" <ubuntu-users at lists.ubuntu.com> wrote:

> 
> On 11/11/23 10:06 AM, Keith wrote:
> > On 11/11/23 9:29 AM, Bo Berglund wrote:
> >> I need to install cups on my Ubuntu 20.04 LTS server (no GUI) to replace an
> >> older (I believe installed Jan 2014) non-functional printer server running on a
> >> RaspberryPi2 which cannot be updated to a current version of the operating
> >> system.
> >>
> >> So I tried the instructions found here for Ubuntu:
> >> https://ubuntu.com/server/docs/service-cups
> >>
> >> I have done these steps:
> >> - sudo apt install cups
> >> - sudo nano /etc/cups/cupsd.conf
> >>     Here I added the following:
> >>     Listen 192.168.xxx.216:631 #My server's IP address so as to reach it

With the proper <limit>...</limit> settings deeper in cupsd.conf, this 
actually allows cups to be admined using the web interface from another 
machine (eg a laptop or desktop out on your LAN), using FF or Chrome, etc.

> >> - sudo usermod -aG lpadmin <my user name>
> >> - sudo systemctl restart cups.service
> >>
> >> Now I wanted to configure the printers and the doc now switch to using a web
> >> interface  so I tried to access the admin webpage on port 631, but since the
> >> server is a non-GUI one I cannot run a browser towards localhost as suggested in
> >> the doc:
> >> http://localhost:631/admin
> > 
> > Use a text-based browser like lynx or links2.
> > 
> > $ lynx localhost:631
> > 
> > works on my system.
> 
> Need to revise my answer. Lynx works on most pages, but not on the 
> Administration page which has CSS that lynx (or links2) doesn't support. 
> The elinks text webbrowser, however, does render the Administration page 
> correctly.

Much of cups *can* be admined with plain CLI commands:

/usr/sbin/cupsaccept
/usr/sbin/cupsctl
/usr/sbin/cupsdisable
/usr/sbin/cupsenable
/usr/sbin/cupsreject
/usr/sbin/lpadmin

There are man pages available for these.

And it is *possible* to just edit the cupsd.conf file in /etc/cups (you should
stop cupsd before editing this file). Amoung the things you can edit is
whether or not cups will listen (with admin access) to machines out on your
LAN -- eg allowing cups to be "remotely" managed ie from a laptop. Of course
you need to be careful here, probably limiting the access to a specific
trusted machine (using <limit>...</limit> directives). cupsd.conf is similar
to Apache's httpd.conf file -- many of the same directives.

> 

-- 
Robert Heller             -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software        -- Custom Software Services
http://www.deepsoft.com/  -- Linux Administration Services
heller at deepsoft.com       -- Webhosting Services
                                                                     



More information about the ubuntu-users mailing list