Printing from Windows ME and LPRng to an Ubuntu server

Asked by David Lee Lambert

I have a small LAN with two printers attached to a Ubuntu workstation running CUPS and Samba, and (at least since I upgraded to Feisty Fawn) I can't get remote printing to work, especially from Windows.

I am able to print just fine from Debian 4.0 running LPRng.

For Windows ME, I'm trying to run Samba on the Ubuntu server. I can mount shared drives just fine. I've tried two ways of configuring /etc/samba/smb.conf:

1. printing = cups \n printcap name = cups

2. printing = bsd \n lpq command = LANG=C /usr/bin/lpq -P%p \n lprm command = LANG=C /usr/bin/lprm -P%p \n print command = LANG=C /usr/bin/lpr -l -P%p -T "%J" %s

Neither one works. When I tell a Windows program to print, the job stays in the print queue. When I reboot to a not-logged-in state, I get an error-message about not being logged in, and the printer becomes disabled. When I
log in to a user account, I can "unpause" the printer without any error-message, but the job still stays in the queue (according to Windows) and never gets printed.

(I tried installing the Windows ME IPP driver, but I can't figure out how to set up a printer to use it. I also know that I used to be able to print from this Windows ME box to a DeskJet and to a dot-matrix printer attached to a Samba+LPRng box without any trouble.)

I've tried raising the Samba and CUPS log-file levels as far as 4 and "debug", respectively. I see the following message a lot:

cupsdAuthorize: No authentication data provided.

Question information

Language:
English Edit question
Status:
Solved
For:
CUPS Edit question
Assignee:
No assignee Edit question
Solved by:
David Lee Lambert
Solved:
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
David Lee Lambert (davidl) said :
#2

I just tried again.

When I try printing, I get an error that reads:

"Printers Folder

There was an error writing to [share name]: There was a problem printing to the printer driver. Restart Windows, and then try printing again. This printer will be set to work offline. To save your print job in the local printer queue, click OK.

OK Cancel"

When I click OK, the same dialog-box pops up again; whn I click Cancel, it goes away.

Revision history for this message
David Lee Lambert (davidl) said :
#3

The error-message that pops up may be viewed at

  http://www.lmert.com/download/printing-to-ubuntu-error.png

Revision history for this message
David Lee Lambert (davidl) said :
#4

The "There was an error writing to printer..." message also appears when I use the Adobe PostScript printer driver to print to the same SMB share. (I'm not sure if that's allowed by the Adobe license, and I'm not sure whether that would actually print the real data instead of the Postscript plain text; but it's another clue that the HP DeskJet 932C driver on Windows is not the problem.)

Revision history for this message
Launchpad Janitor (janitor) said :
#5

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
David Lee Lambert (davidl) said :
#6

Since printing from Windows to Ubuntu doesn't seem to work, I tried printing via Samba+LPR on a Debian box that I have used as a printer before; but that doesn't work either... here's what I see from the middleman box:

$ lpq -Pdjet
Printer: djet@ramoth (dest <email address hidden>)
 Queue: no printable jobs in queue
 Server: no server active
 Status: job 'davidl@ramoth+973' saved at 13:08:02.079
 Rank Owner/ID Pr/Class Job Files Size Time
error davidl@ramoth+973 A 973 ERROR: Mystery error from Send_job
DeskJet-932C is ready
no entries

Here's the relevant section from /etc/printcap:

djet:DeskJet-932C:\
  :rm=grendel.lmert.com:rp=DeskJet-932C:\
  :sd=/var/spool/lpd/djet-y:\
  :force_localhost:\
  :if=/usr/bin/foomatic-rip:\
  :ppd=/etc/lprng/HP-DeskJet_932C-hpijs.ppd:\
  :mx#0:sh:

Here's the relevant section from /etc/samba/smb.conf:

[DJET]
printable = yes
print command = lpr -l -J"%J" -Pdjet %s ; rm %s
path = /var/spool/samba/DJET
guest ok = yes
hosts deny = ALL
hosts allow = 192.168.15. , 192.168.5. , 192.168.0.
visible = yes

The relevant section of /etc/printcap on another computer from which I can print jus fine reads:

djet:DeskJet-932C:\
  :rm=grendel.lmert.com:rp=DeskJet-932C:\
  :sd=/var/spool/lpd/djet-y:\
  :force_localhost:\
  :if=/usr/bin/foomatic-rip:\
  :ppd=/etc/lprng/HP-DeskJet_932C-hpijs.ppd:\
  :mx#0:sh:

Any suggestions?

Revision history for this message
David Lee Lambert (davidl) said :
#7

From http://mdlug.org/pipermail/mdlug/2007-August/002387.html :

"I finally got it to work. In /etc/samba/smb.conf, in the [printers] share,
the "path=" line was pointing to a location that was not world-writable. I
switched it to "path=/var/spool/samba" and now it works fine.

"I also commented out the line "public=yes", but I don't think that was the
problem."