Some builds of Puppy do not have the 'smbspool' utility (type "which smbspool" in a terminal to find out). There is a special CUPS driver script named 'smbw' which in turn uses the 'smbclient' utility to print. This is a valuable contribution from rcrsn51.
The device URI (Uniform Resource Identifier) format for smbspool is defined as:
smb://[username[:password]@][workgroup/]server[:port]/printer
Please take note of the compulsory minimum in bold: smb:// [username[:password]@] [workgroup/] server [:port] /printer
Examples:
Features:
Extract from: http://willem.engen.nl/projects/cupssmb/
by Willem van Engen
CUPS uses smbspool(8) to print pages to windows servers. This did not appear to work, whereas printing with smbclient(1) did (some relief). Wanting to get it working, I created a custom CUPS backend that uses the latter instead of the former. This also allowed me to solve the problem of the windows password being visible in the device uri (which is shown in the web interface). Note that this still is a work in progress: it is being used with success, but now and then I encounter issues. This page will be updated accordingly.
Following are sections for using the aforementioned programs. The final section gives a possible solution for using windows print servers with CUPS when smbspool(8) isn't working.
A CUPS backend(7) is a program, usually located in /usr/lib/cups/backend/, that sends a job to a printer or print server. CUPS uses smbspool(8), which is part of samba, to spool jobs to windows servers. To this end, there is a symbolic link from /usr/lib/cups/backend/smb to /usr/bin/smbspool.
To test the backend, it is possible to invoke smbspool(8) by hand. For example:
DEVICE_URI="smb://server/printer" smbspool 1234 me sometitle 1 <test.ps
It is also possible to use smbclient(1) to print. When logging into a printer share on a windows server, one can issue the print command to print a file. For example:
When smbspool(8) doesn't work, it may be possible to get printing working with smbclient(1).
You should still create the file /etc/samba/printing.auth containing your windows credentials, like this:
Remains to setup CUPS. I recommend to add a printer using the web interface with a device uri with protocol smbw, like smbw://physfp.phys.tue.nl/n-IS2060PS
If you happen to use AppArmor in enforcing mode, you'll need to add #include <abstractions/samba> to the cupsd profile.