What's not so great is that gnome-cups-ui has no concept of workgroups or domains for connecting via smb to a windows printer. When you go to "add new printer" or when you view the connection properties after adding the new printer, the fields you are presented with are:
After googling for a bit, I discovered that people have figured out that if you put the workgroup name in the Host field and then enter username:password@host/Printer into the Printer field and nothing into either the username or password fields, you can print!
Curious about this obscurity, I did an apt-get source gnome-cups-ui and hunted around for a bit. Eventually, I found some code that looks basically like this:
if (username != NULL && username && password != NULL && password)
ret = g_strdup_printf("smb://%s:%s@%s/%s", username, password, host, printer);
ret = g_strdup_printf("smb://%s/%s", host, printer);
do you see what's happening? The hack outlined above uses the second case. An alternative would be to enter workgroup/username into the Username field and your password into the password field, that would use the first case. The problem with doing that, however, is that if you don't enter a password then the username will be ignored.. this isn't much good if you're trying to use the Guest account, which requires no password. Also, even if you're using a real account, the resulting URI won't parse correctly so when you refresh the connection properties you'll end up with the workgroup in the Host field and everything else (including your password) in the Printer field.
I wrote myself a nice little patch to ask for a workgroup and parse the uri correctly, etc. If anyone wants it, you can grab it from here:
However, turns out this has already been fixed in the latest CVS, so I won't be contacting the authors. Kinda makes me wonder how long it takes for fixes like this to filter out of CVS and into the distributions. Ubuntu releases are tied to the GNOME releases, so it should be one of the fastest to get fixes like this, but this is still broken in the latest Ubuntu release (Edgy).