[cups.bugs] [HIGH] STR #3562: Cannot specify username for LPR printers

Kevin Gao sudowork at gmail.com
Thu Apr 22 09:48:02 PDT 2010


DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

OS issue is encountered with: Mac OS X 10.6.0+. I have not tested this on
any Linux systems; although I assume that the issue would be present if it
is a problem with CUPS itself.

This perhaps isn't an bug, but a result of the URL-encoding. Once again,
I'm not sure if the URL is encoded at OS X's interface or at the daemon.

I'm on a college campus using Kerberos; however, the printers do not
require authentication. Therefore, with CUPS v1.3.x, you could add a new
printer using the following URL:
lpd://user@xxx.xxx.xxx.xxx/QueueName

Where 'user' is replaced with the username on the Kerberos network,
'xxx.xxx.xxx.xxx' is replaced with the printer's IP or hostname, and
'QueueName' is replaced with the printer's Queue Name.

In v1.4.x, this URL becomes parsed to be:
lpd://user%40xxx.xxx.xxx.xxx/QueueName

Noting that the '@' symbol has been converted to its URL-encoded
equivalent of '%40'.

I have found a manual fix for this by editing /etc/cups/printers.conf to
change the '%40' back to '@' in the configuration file. Then I deleted the
relevant plist file /Library/Preferences/org.cups.printers.plist. Next I
restarted the CUPS daemon by killing the cupsd process.

This resolved the issue; however, it was a hassle to figure out. I know
that the URL encoding was probably added for security reasons; however, it
did disable some functionality. I also realize that Kerberos integration
has already been realized/documented, but because no authentication is
needed to use these printers, it is easier to just specify the username
within the URL.

Link: http://www.cups.org/str.php?L3562
Version: 1.4.2





More information about the cups-devel mailing list