In order to print the document, you'll need to tell Samba what the command is to print and delete a file. On Linux, such a command is:
lpr -r -P
lpr to copy the document to a spool area, usually
/var/spool, retrieve the name of the printer in the system configuration file (
/etc/printcap), and interpret the rules it finds there to decide how to process the data and which physical device to send it to. Note that because the
-r option has been listed, the file specified on the command line will be deleted after it has been printed. Of course, the file removed is just a copy stored on the Samba server; the original file on the client is unaffected.
Linux uses a Berkeley (BSD) style of printing. However, the process is similar on System V Unix. Here, printing and deleting becomes a compound command:
With System V, the
/etc/printcap file is replaced with different set of configuration files hiding in
/usr/spool/lp, and there is no option to delete the file. You have to do it yourself, which is why we have added the
rm command afterward.