Gentoo Archives: gentoo-user

From: Michael <confabulate@××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Sharing printers via Cups
Date: Thu, 11 Feb 2021 14:05:25
Message-Id: 3967926.1IzOArtZ34@lenovo.localdomain
In Reply to: Re: [gentoo-user] Sharing printers via Cups by Dan Egli
1 On Wednesday, 10 February 2021 23:03:18 GMT Dan Egli wrote:
2 > On 2/10/2021 4:30 AM, Michael wrote:
3
4 > > This is how I understand the printing process ought to work in your use
5 > > case:
6 > >
7 > > The Samba server, Athena, will use the MSWindows Network Printer
8 > > identified as "Windows Printer via SAMBA" in its CUPS GUI.
9 > >
10 > > Printing jobs will be submitted from Athena's CUPS to the MSWindows PC &
11 > > its attached printer, via the corresponding smb:// URI. CUPS which will
12 > > use the Samba server on Athena to authenticate and send the data for
13 > > printing to the MSWindows PC and its shared printer.
14 > >
15 > > The same process will need to be followed by Janus; i.e. the CUPS server
16 > > on Janus will have to use the same smb:// URI to submit the data to be
17 > > printed to Athena's Samba server and as long as authentication is
18 > > successful Athena will forward it to the Windows PC.
19 >
20 > Forgive me, but if I use the SAME url, then it's not Athena acting as
21 > the print server, it's the windows client that the printer is hooked up
22 > to.
23
24 Sorry, I meant to say on Janus use the smb://Athena/<printer> URI and see if
25 Athena then forwards the request via the shared Samba printer service onward
26 to the MSWindows PC. Of course if you try to print directly to the MSWindows
27 PC with smb://IRIS/<printer> it will work, just as it works from Athena - but
28 that's not what you're after.
29
30
31 > I tried to use the LPD to print to Athena and have Athena print to
32 > the printer via Samba. That's where I was running into problems. I
33 > suppose I can try IPP. I don't know of a smb:// url would work goinf
34 > from Janus (or anyone else) to Athena. After all, the printer isn't
35 > connected to Athena. It's connected to the windows 10 home PC. I suppose
36 > IPP might work if I configure that. As far as listening on 631, Athena's
37 > cups was ALREADY listening on that port because that's where the web
38 > interface is. the url I use to manage the printers is
39 > https://athena:631. I guess that somehow Cups can tell the difference
40 > between https, http, and ipp all coming on the same port.
41
42 The ports listened to by CUPS are as follows:
43
44 https://www.cups.org/doc/firewalls.html
45
46 When the printer URI used is http, then the MIME type used by IPP will be
47 "application/ipp" to transact printing commands. A browser will access the
48 admin GUI over http also on port 631.
49
50 LPD/LPR is limited in functionality and deprecated, although if it could be
51 made to work for now there'd be no argument against using it. ;-)
52
53 IPP is well supported, however, without trying it out I wouldn't know if it
54 will work in your particular use case. In theory a shared CUPS server on
55 Athena, plus its shared printer, should allow Janus to submit print jobs to
56 it. The shared printer advertised by CUPS in Athena should pop up on Janus as
57 an available printer via mDNS.
58
59
60 > > The Samba configuration on Athena will deal with the settings for sharing
61 > > the MSWindows printer.
62 >
63 > Okay, so basically you're saying that Athena would connect via
64 > smb://windows/<PRINTER> and that Janus or other computers would connect
65 > via smb://Athena/<PRINTER>? Okay, that may work.
66
67 Yes, under this configuration scenario the printing service served by Samba on
68 Athena is a shared Windows printer and would be accessed via the smb://
69 protocol. So, the Janus CUPS server will connect to the printer service
70 provided by the Samba server on Athena. Again, without trying it out and
71 troubleshooting it I wouldn't know if it'd work.
72
73
74 > I'll have to do a bit
75 > of digging because Athena and Janus are actually connected to an AD
76 > Domain run by samba. In fact, Janus is the DC while Athena is the
77 > location of the files/printers to be shared in the domain.
78
79 As long as Janus (the Samba client) is authenticated to use Samba services
80 being served by Athena, it /should/ work. You would need to configure
81 firewalls accordingly to keep ports available, if you have firewalls enabled.
82
83 Grant's comment about buying a printer is opportune, depending on the value of
84 (your) time. The cost of printers and especially 2nd hand printers with so
85 many companies going bust, should approximate zero. The expense of running a
86 printer is in the overinflated ink price, which is a multiple of the upfront
87 cost of buying the device.
88
89 On the other hand, if cashflow itself is zero, options are understandably
90 limited.

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] Sharing printers via Cups Dan Egli <dan@×××××××××××.site>