[Pkg-samba-maint] Bug#425555: smbspool command should handle special URIs

Luiz Carlos Ramos ramosl at diebold.com
Tue May 22 13:34:00 UTC 2007


Package: smbclient
Version: 3.0.24-6

I think I found a limitation at the command "smbspool", which makes me
unable to configure passwords with non-alphabetic chars at the CUPS
print subsystem.

The problem arose when I changed my password using a string crafted with
the pound sign, and configured it at the file /etc/cups/printers.conf,
just like:

<Printer My_SMB_Printer>
Info My_SMB_Printer
DeviceURI smb://myuser:mypass@my_domain/some_machine/some_printer_share
State Idle
StateTime 1172757484
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
</Printer>


If one have to change the password using different chars, like $, #, and
so on, sometimes there are problems, mainly to the parser of the CUPS
subsystem. For instance, the pound sign is handled as a "start command"
token, and it gives an error.

But when I read the documentation, I realize I could embed this
character into the configuration using the %hh syntax, which is
documented as a valid URI. So, instead of:

 smb://myuser:pound_pass_#@my_domain/some_machine/some_printer_share

I tried:

 smb://myuser:pound_pass_%23@my_domain/some_machine/some_printer_share

and this had the effect of wrapping around the limitations of the CUPS
configuration. So, CUPS did its job and sent the printings to the SMB
printer, calling smbspool with the URI above.

But there were problems, mainly because smbspool seems to not handle
syntaxes like those starting by "%" as supposed. I checked the source
code and certified this (well, this was three months ago, maybe things
change). I worked around the problem renaming smbspool to smbspool.bin
and writing a simple shell script - named smbspool - which translates
the %23 sequence back to the pound sign, after the CUPS processing, and
calls "smbspool.bin". It worked fine, but unfortunately I lost it when I
upgraded the smbclient package some days ago.

I think it is not the case of implementing the extensive solution of
having all URI syntaxes supported; but instead, having only the %hh
sequence available is sufficient to have any password supported.

As I am not - yet - a registered Debian developer, please cc: myself at
lramos.procomp at ig.com.br

Thanks,

Luiz Ramos
São Paulo - Brazil






More information about the Pkg-samba-maint mailing list