[Samba] Printing to FreeBSD server from XP using samba

David Lodeiro dlodeiro at inspired.net.au
Wed Aug 13 10:34:05 GMT 2003


A couple of days ago I set up my printer on my FreeBSD server and set it
up so I could print from my FreeBSD client. This all works very well,
printing from botht the server and the FBSD client. However, I also have
samba set up for file serving with an XP box. I have been trying for
quite some time now to set samba up to enable me to print from the XP
client. My situation at the moment is that the XP client can detect the
printer in explorer, I can set up a printer using a wizard to print to it 
without any errors, however when I go to print a test page, nothing happens. 
No errors, no printout, and the wierdest part is that nothing shows up in 
either the que on my xp box or on the lpq on the server.

I started the smbd and nmbd demons with debugger set to 10 to see if I
could find something out

Firstly the relevant part of my printcap file

Canoni850|bjc800:\
    :lp=/dev/lpt0:\
    :sd=/var/spool/lpd/Canoni850:\
    :lf=/var/spool/lpd/Canoni850/log:\
    :mx#0:\
    :sh:


To handle all the raw printing ( ie. from windows )

And the relevent art of my smb.con
[printers]
   comment = Printers
   path = /var/spool/lpd
   browseable = no
   printable = yes
   public = yes
#   create mode = 4777

[Canoni850]
   comment = Canoni850
   path = /var/spool/lpd/Canoni850
   browseable = yes
   printable = yes
#   printer driver = Canon i850

[lp]
   comment = FreeBSD printer
   browseable = no
   printable = yes


Here is what I got in log.smbd with log level at 10

[2003/08/12 23:40:55, 5] lib/util_sock.c:print_socket_options(111)
  socket option SO_SNDLOWAT = 2048
[2003/08/12 23:40:55, 5] lib/util_sock.c:print_socket_options(111)
  socket option SO_RCVLOWAT = 1
[2003/08/12 23:40:55, 5] lib/util_sock.c:print_socket_options(111)
  socket option SO_SNDTIMEO = 0
[2003/08/12 23:40:55, 5] lib/util_sock.c:print_socket_options(111)
  socket option SO_RCVTIMEO = 0
[2003/08/12 23:40:55, 10] printing/nt_printing.c:update_c_setprinter(368)
  update_c_setprinter: c_setprinter = 0
[2003/08/12 23:40:55, 6] param/loadparm.c:lp_file_list_changed(2302)
  lp_file_list_changed()
  file /usr/local/etc/smb.conf -> /usr/local/etc/smb.conf  last mod_time: Tue 
Au

[2003/08/12 23:40:55, 3] smbd/oplock.c:init_oplocks(1214)
  open_oplock_ipc: opening loopback UDP socket.
[2003/08/12 23:40:55, 3] lib/util_sock.c:open_socket_in(813)
  bind succeeded on port 0
[2003/08/12 23:40:55, 3] smbd/oplock.c:init_oplocks(1245)
  open_oplock ipc: pid = 9747, global_oplock_port = 49804
[2003/08/12 23:40:55, 4] lib/time.c:get_serverzone(114)
  Serverzone is -36000
[2003/08/12 23:40:55, 10] 
lib/util_sock.c:read_smb_length_return_keepalive(559)
  got smb length of 68
[2003/08/12 23:40:55, 10] lib/access.c:check_access(304)
  check_access: allow = , deny =
[2003/08/12 23:40:55, 6] smbd/process.c:process_smb(845)
  got message type 0x81 of len 0x44
[2003/08/12 23:40:55, 3] smbd/process.c:process_smb(846)
  Transaction 0 of length 72
[2003/08/12 23:40:55, 2] smbd/reply.c:reply_special(92)
  netbios connect: name1=DAVESSERVER      name2=JOSE
[2003/08/12 23:40:55, 2] smbd/reply.c:reply_special(111)
  netbios connect: local=davesserver remote=jose

Jose is the name of the XP client, davesserver is the name of the FreeBSD box. 
Sorry about the long post

Any help is appreciated

Thankyou

David




More information about the samba mailing list