Gentoo Archives: gentoo-user

From: Michael <confabulate@××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Sharing printers via Cups
Date: Wed, 10 Feb 2021 11:30:33
Message-Id: 1779084.CQOukoFCf9@lenovo.localdomain
In Reply to: Re: [gentoo-user] Sharing printers via Cups by Dan Egli
1 On Tuesday, 9 February 2021 19:23:41 GMT you wrote:
2 > On 2/9/2021 3:20 AM, Michael wrote:
3 > >> Actually tried that. Got LPD installed, sent a test page. Test page
4 > >> appeared in the Windows Queue, then disappeared without any
5 > >> acknowledgement from the printer.
6 > >
7 > > This would need some troubleshooting/configuring on the Windows end. It's
8 > > a long time ago I tried this and don't recall what I had configured to
9 > > allow clients to print via the Windows PC. It was relatively simple and
10 > > lightweight though, unlike Samba which I wouldn't bother with just for
11 > > printing.
12 >
13 > If it was JUST for printing I'd agree. But the whole samba setup is for
14 > more than that. There's also file sharing (since Windows 10 home doesn't
15 > support NFS), central authentication, things like that.
16
17 Ah! Fair enough. Since Samba is running you might as well use it for
18 printing.
19
20
21 > >> I finally got it working in samba mode
22 > >> so I'm good with that. And that, again, would skip the whole point of
23 > >> having a central print server. :)
24 > >
25 > > Not really. Athena would remain the CUPS server for itself and any Linux
26 > > or additional OS clients, sending jobs over IPP:// to the Windows print
27 > > server running on the Windows PC.
28 >
29 > Okay, I could see that one. Although I'm totally lost when it comes to
30 > IPP. I've looked but apparently my google-fu is still weak because I
31 > can't find any good documentation on how to setup IPP, how to format the
32 > URLs, etc....
33
34 I have found IPP to be straight forward, simpler than other set ups and
35 provided by most (all?) printers on port 631. Setting it up is explained in
36 this section:
37
38 https://wiki.gentoo.org/wiki/Printing#Installing_the_printer
39
40 Something like 'ipp://192.168.10.2/ipp' should work - your printer's manual
41 would confirm what it accepts. Anyway, this is not what you're after in your
42 use case.
43
44
45 > >>> 3. If the current setup is the right thing for you, increase CUPS log
46 > >>> verbosity and check the logs on Athena to find out what it isn't happy
47 > >>> with
48 > >>> when Janus sends a print job to it. First check the CUPS driver and
49 > >>> printing protocol is the same on Janus as on Athena and the CUPS' config
50 > >>> on Athena allows inbound connections from your LAN, or your Janus' IP
51 > >>> address.
52 > >>
53 > >> I can check on those. Thanks. I do notice one thing strange. Maybe a
54 > >> cups bug. In the web interface when I created the printer in Athena, I
55 > >> checked the box to say it was a shared printer. But when I look at the
56 > >> status it says "not shared".
57
58 OK, I just tested it here. I ticked to share *both* the CUPS server and a
59 laser printer. The server setting is on the right hand side of the
60 Administration page on the GUI and the printer on the left of the page.
61
62 I observed the same result like you - although CUPS started listening on port
63 631 for connections from LAN clients, the GUI continued to show "not shared".
64
65 NOTE: I did not test printing a page from a client to see if the display on
66 the GUI changes to say "shared". It may be a real time indication of the
67 status of the printer - or it could indeed be a bug.
68
69
70 > > Hmm ... what follows the commented line:
71 > >
72 > > # Restrict access to the server...
73 > > <Location />
74 > > Order Deny,Allow
75 > > ... ?
76 > >
77 > > in the '/etc/cups/cupsd.conf' of Athena?
78 >
79 > Here's the entire file. Although I fail to see what the allow/deny could
80 > mean for a printer showing on Athena. It's not that Janus says it's not
81 > a shared printer. It's ATHENA saying it's not shared, right after I
82 > checked the box to make it shared.
83
84 Yes, you're right, the indication "not shared" won't change by ticking the box
85 "shared" - I just wanted to confirm the actual configuration of the server was
86 not restricting connections to CUPS for localhost only. However, it seems
87 without having the same setup here, I may have given you a bum steer - my
88 apologies:
89
90 Reading the wiki page it states -
91
92 https://wiki.gentoo.org/wiki/Printing#Remote_printer_access
93
94 "... For other systems to use the printer through IPP, explicit access to the
95 printer must be granted in the /etc/cups/cupsd.conf file. To share the printer
96 using SAMBA, this change is not needed."
97
98 I note you're using CIDR notation for the LAN subnet, while the wiki is using
99 a "*" wildcard instead. I don't know if it makes a difference, but anyway
100 since you'll be using a Samba shared printer this should not be relevant.
101
102 [snip ...]
103
104 > > Similarly, check the "hosts allow" directive in the Samba configuration to
105 > > include Janus' IP address.
106 >
107 > Again, I think you're misunderstood the problem. Forget Janus for a
108 > second. Forget Samba for a minute. I create a pinter via the CUPS web
109 > interface on Athena. When it shows the box to make it shared, I check
110 > the box. When I finish and the printer status appears, it says "not
111 > shared". Other machines and other protocols have not even come into play
112 > yet.
113
114 I understood you were faced with two problems, really though, one only.
115 Printing from Janus doesn't work. Printing from the other PCs works as
116 intended.
117
118 The "not shared" printer indication on CUPS GUI on Athena, should not be a
119 problem affecting Janus' ability to print - I expect it is irrelevant. The
120 Samba logs will hopefully indicate where the actual problem lies.
121
122 This is how I understand the printing process ought to work in your use case:
123
124 The Samba server, Athena, will use the MSWindows Network Printer identified as
125 "Windows Printer via SAMBA" in its CUPS GUI.
126
127 Printing jobs will be submitted from Athena's CUPS to the MSWindows PC & its
128 attached printer, via the corresponding smb:// URI. CUPS which will use the
129 Samba server on Athena to authenticate and send the data for printing to the
130 MSWindows PC and its shared printer.
131
132 The same process will need to be followed by Janus; i.e. the CUPS server on
133 Janus will have to use the same smb:// URI to submit the data to be printed to
134 Athena's Samba server and as long as authentication is successful Athena will
135 forward it to the Windows PC.
136
137 The Samba configuration on Athena will deal with the settings for sharing the
138 MSWindows printer.
139
140 HTH.

Attachments

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

Replies

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