you should be able to talk with the windows machine and ask for a list of shared printers with this command:
smbclient -L rice -N
If Windows naming service is unavailable you will need to specify the IP address of the Windows PC with the -I switch as in:
smbclient -I 192.168.1.25 -L rice -N
Once you have found a Windows printer you may configure CUPS.
First verify that your installation of CUPS has the smb backend with the following command:
ls -l /usr/lib/cups/backend/smb
If this file does not exist create it by issuing the following:
ln -s `which smbspool` /usr/lib/cups/backend/smb
The following is an example of setting up the printer shown above:
lpadmin -p RicePrinter -v smb://rice/INKJET -P /root/inkjet.ppd
lpadmin -d RicePrinter
If Windows naming service is unavailable, add the switch -h followed by the IP address of the Windows PC to the first lpadmin command as in:
lpadmin -p RicePrinter -h 192.168.1.25 -i smb://rice/inkjet-P /root/inkjet.ppd
Your printer is now ready to test. Send a file to the printer with the lp command followed by a filename, or by printing a document from within an application.
- please note that this example is based on the debian family of distros.