Just fixed. Was getting
Tree connect failed (NTSTATUSBADNETWORKNAME)
when printing from my Mac to a printer hanging off a Ubuntu machine.
Having recently upgraded Ubuntu that was probably the culprit.
This link has more details http://ubuntuforums.org/showthread.php?t=1578421.
The short answer was to restart the following on the Ubuntu machine.
$sudo service cups restart
$sudo service smbd restart