OK, hopefully you've got your Samba server serving files (even if you only want to use it as a print server I'd suggest that a test share will allow you to check that Samba's running OK.) The next job is to get Samba working as your print server.
http://localhost:631/adminlogging in as root) and print a test page. If that works OK, the we need to sort out smb.conf
[global]Obviously, we need to define the printers in smb.conf, but we don't now need to set each one up individually thanks to load printers.
printcap name = cups
load printers = yes
printing = cups
[printers]And I've allowed open access to anyone to print, but only root and administrator have any admin rights. (making sure that the Windows username that you'll be using to test the printer is listed in the printer admin list ought to prevent you from suffering the "Access denied, unable to connect" error that can be very irritating until you figure out just what it means.)
comment = All Printers
path = /var/spool/samba
browseable = yes
public = yes
guest ok = yes
writable = yes
printable = yes
printer admin = root administrator
service smb reloadand hopefully you should see the printer listed in both \\SERVERNAME\ and the printers folder. If you can see it there, then you can use Windows Add Printer Wizard to add it as a network printer as you would any other. Hopefully you should now be able to print a test page from Windows. If not (What bitter voice of experience?) I'd suggest trying
echo Hello > \\SERVERNAME\PRINTERNAME
/var/log/cupsand have a look through
error_log. entries like:
print_job: Unsupported format 'application/octet-stream'!can be considered significant!
Hint: Do you have the raw file printing rules enabled?
mime.convsuncomment the line:
# application/octet-stream application/vnd.cups-raw 0 -
mime.typesuncomment the line:
service cups restartbut with a bit of luck you should now be able to print a test page from Windows, and hence anything else as well. If you're still having problems, increse the
LogLevel infosetting in
cupsd.conf(the options are immediately above) and restart cups and see if you can get any more meaningful information.