Print from Linux via Samba

Recently I faced with problem of printing from the Linux server to the printer connected to the Windows PC via USB. So, here is a brief how to do it using CUPS.
1. Type http://localhost:631/ in your browser to open CUPS web interface and go to “Add new printer” page.
2. For device choose “Windows Printer via SAMBA”. If this options isn’t presented in the drop down list run following command as root:
ln -s `which smbspool` /usr/lib/cups/backend/smb
3. Device URI type in following format:
smb://win_user:win_pass@win_domen/win_PC/printer_name
4. Choose appropriate driver for your printer. I didn’t find my model in the list. So, I chose one from Generic:
Generic -> Generic PCL 6/PCL XL Printer Foomatic/pxlmono
For more information, please refer to OpenPrinting database.

See also: