[FreeNX-kNX] FeeeNX cups printing authentication
Alastair Johnson
alastair at solutiontrax.com
Mon Jun 19 13:41:51 UTC 2006
You need to modify /usr/bin/nxnode function cmd_node_addprinter() to include the username and password when setting up the CUPS printer, and change the host from localhost to the hostname or IP address. Change the line:
DEVICE_URI="ipp://localhost:$port/printers/$printer"
to:
DEVICE_URI="ipp://$username:$password@your_hostname_here:$port/printers/$printer"
I _think_ the change from localhost to actual hostname is needed because CUPS uses token-based authentication for localhost instead of the usual challenge-response methods. Normally this is fine, but since we are port-forwarding to a non-local cups we need the challenge-response, so we need something that resolves to the local machine but isn't localhost (or 127.0.0.1 for that matter)
On Monday 19 June 2006 13:22, Pieter Thysebaert wrote:
> Hello,
>
> I'm running Debian sarge with
> NXSERVER - Version 1.4.0-45-SVN OS (GPL)
>
> installed from deb http://debian.tu-bs.de/project/kanotix/stable/
> stable-backports nx
>
> On the client side, I'm also running sarge with the noMachine 1.5.0
> official client. the nxclient on the server side is the same official
> 1.5.0 client.
>
> I'm attempting to enable transparent printing to a CUPS printer attached
> to the client.
>
> I have skimmed through the archives to resolve the following problems:
> 1. delete the -noautokill option given to nxclient by nxnode
> 2. replace lpadmin with /usr/sbin/lpadmin in nxnode
>
> What I'm left with now, however, is a CUPS authentication problem. At
> the server side, a user cupsd is started (and I get the printer config
> dialog) running on port 10000, and it knows about one printer at
> localhost:3000
>
> At the client side is a user cupsd listening on port 20000, and connects
> to the client side system cupsd. The user cupsd requires authentication.
>
> Port 3000 on the server is effectively tunnelled to port 20000 on the
> client, and connecting on the server to port 3000 using username and
> password written (in insecure debug mode) to /var/log/nxserver.log works.
>
> However, "IPP_PORT=10000 lpr test.txt" on the server gets stuck on an
> authentication problem:
>
> On the server side, the user cupsd reports
>
> Getting supported attributes...
> E [18/Jun/2006:20:09:25 +0200] [Job 1] Unable to get printer status
> (client-error-not-authorized)!
>
>
>
> On the client side, the user cupsd reports
>
> AcceptClient: 4 from localhost:20000.
> D [01/Jun/2006:23:37:11 +0200] ReadClient: 4 POST /printers/Deskjet
> HTTP/1.1 D [01/Jun/2006:23:37:11 +0200] SendError: 4 code=401
> (Unauthorized) D [01/Jun/2006:23:37:11 +0200] CloseClient: 4
>
>
> Can anyone tell me what some causes of this problem may be? What are the
> configuration requirements for the system cupsd on both client and
> server required for this to work?
> When/by what program is the user/password pair listed in
> /var/log/nxserver.log used?
>
> Thx,
> Pieter
>
> ________________________________________________________________
> Were you helped on this list with your FreeNX problem?
> Then please write up the solution in the FreeNX Wiki/FAQ:
> http://openfacts.berlios.de/index-en.phtml?title=FreeNX_FAQ
> Don't forget to check the NX Knowledge Base:
> http://www.nomachine.com/kb/
>
> ________________________________________________________________
> FreeNX-kNX mailing list --- FreeNX-kNX at kde.org
> https://mail.kde.org/mailman/listinfo/freenx-knx
> ________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/freenx-knx/attachments/20060619/ec95aac4/attachment.html>
More information about the FreeNX-kNX
mailing list