printing to windows printer

tadek at telus.net tadek at telus.net
Sun Jan 9 16:39:16 PST 2005


Hello,

I am begging for help.

I am having problem printing to my windows printer from Linux box runing Mandrake 10.1 using CUPS and Samba. I must say that printing in Linux is not my strongest point:(
Funny thing is that I am able to print to the same printer from different Linux box (it runs Debian Sarge) with no problem using same technique (Samba/CUPS).

Here is the situation:

0) I am running Madrake 10.1 with smbd 3.0.10, nmbd 3.0.10
   Kernel 2.6.8.1-12mdk; Cups 1.1 configured using localhost:631 (uri: smb://tad:tadek@MSHOME/TAD-DESKTOP/HP2100)

1) [root at test samba]# lpstat -t
---------------------------------------------
scheduler is running
system default destination: hp2100
device for hp2100: smb://MSHOME/TAD-DESKTOP/HP2100
hp2100 accepting requests since Jan 01 00:00
printer hp2100 now printing hp2100-7.  enabled since Jan 01 00:00
        Unable to connect to SAMBA host, will retry in 60 seconds...ERROR: SMB tree connect failed: NT_STATUS_ACCESS_DENIED
hp2100-7                root              1024   Sun 09 Jan 2005 03:32:57 PM PST

2) in /etc/cups/cupsd.conf I changed LogLevel to Debug
    examining log error_log after print attempt I find following line:
....
D [09/Jan/2005:15:32:59 -0800] [Job 7] PageSize = [ 612 792 ], HWResolution = [ 300 300 ]
D [09/Jan/2005:15:32:59 -0800] [Job 7] HWMargins = [ 18.000 35.000 18.000 0.000 ]
D [09/Jan/2005:15:32:59 -0800] [Job 7] matrix = [ 4.167 0.000 0.000 -4.167 -75.000 3300.000 ]
E [09/Jan/2005:15:33:59 -0800] [Job 7] SMB tree connect failed: NT_STATUS_ACCESS_DENIED
E [09/Jan/2005:15:34:59 -0800] [Job 7] Unable to connect to SAMBA host, will retry in 60 seconds...ERROR: SMB tree connect failed: NT_STATUS_ACCESS_DENIED
....
last line repeats itself every 60 secs

3) [root at test samba]# cat /etc/cups/printers.conf
-----------------------------------------------------------------------
# Printer configuration file for CUPS v1.1.21rc1
# Written by cupsd on Sun 09 Jan 2005 03:22:45 PM PST
<DefaultPrinter hp2100>
...
DeviceURI smb://tad:tadek@MSHOME/TAD-DESKTOP/HP2100
State Idle
Accepting Yes
...
</Printer>

4) stripped cupsd.conf file
--------------------------------------
# cat /etc/cups/cupsd.conf|grep -v ^# |grep [:alnum:]
LogLevel debug
TempDir /var/spool/cups/tmp
<Location />
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
</Location>
<Location /admin>
AuthType Basic
AuthClass System
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
</Location>

5) stripped smb.conf
-----------------------------
[root at test samba]# cat /etc/samba/smb.conf|grep -v [#\;]|grep [:alnum:]
[global]
   workgroup = MSHOME
   server string = Samba Server %v
   printcap name = cups
   load printers = yes
   printing = cups
   printer admin = @adm
   log file = /var/log/samba/log.%m
   max log size = 50
  map to guest = bad user
   security = user
  encrypt passwords = yes
  smb passwd file = /etc/samba/smbpasswd
   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
   dns proxy = no
[homes]
   comment = Home Directories
   browseable = no
   writable = yes
[printers]
   comment = All Printers
   path = /var/spool/samba
   browseable = no
   guest ok = yes
   writable = no
   printable = yes
   create mode = 0700
   use client driver = yes
[print$]
   path = /var/lib/samba/printers
   browseable = yes
   write list = @adm root
   guest ok = yes
   inherit permissions = yes
[pdf-gen]
   path = /var/tmp
   guest ok = No
   printable = Yes
   comment = PDF Generator (only valid users)
   printing = bsd
   print command = /usr/share/samba/scripts/print-pdf "%s" "%H" "//%L/%u" "%m" "%I" "%J" &
    lpq command = /bin/true

6) I am not sure what additional information would be helpful. Perhaps the fact that I am able to print to above printer using smbclient from the same PC:

[root at test samba]# echo -en "\rHello World\r\f" |smbclient "//TAD-DESKTOP/HP2100" "tadek" -c "print -" -N -U "tad" -W "MSHOME"
added interface ip=192.168.0.7 bcast=192.168.0.255 nmask=255.255.255.0
Got a positive name query response from 192.168.0.6 ( 192.168.0.6 )
Domain=[MSHOME] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]
putting file - as stdin-24914 (1.7 kb/s) (average 1.7 kb/s)

I would appreciate a clue to solve this problem.
Regars, Tad





More information about the cups mailing list