[Samba] Desperate plea for help with printer share

Mark LaPierre marklapier at aol.com
Tue Apr 2 18:27:10 MDT 2013


>> -----Oorspronkelijk bericht-----
>> Van: marklapier at aol.com [mailto:samba-bounces at lists.samba.org]
>> Namens Mark LaPierre
>> Verzonden: dinsdag 2 april 2013 1:56
>> Aan: samba at lists.samba.org
>> Onderwerp: Re: [Samba] Desperate plea for help with printer share
>>
>> On 03/30/2013 11:45 PM, Gary Dale wrote:
>>> On 30/03/13 08:38 PM, Mark LaPierre wrote:
>>>> Hey Y'all,
>>>>
>>>> I've been trying for months to get samba to share my printer with my
>>>> wife's Win XP machine.  I've RTFM, and spent hours on
>> google to no avail.
>>>>
>>>> I can't see the printer from Windows so I can't mount it
>> up.  Nothing
>>>> appears in the logs.  The file shares work just fine.
>>>>
>>>> It looks like I've got Samba 3.6.9 on this machine:
>>>>
>>>> [mlapier at mushroom samba]$ rpm -qa | grep samba
>>>> samba-swat-3.6.9-151.el6.i686
>>>> samba-doc-3.6.9-151.el6.i686
>>>> samba-client-3.6.9-151.el6.i686
>>>> samba-winbind-clients-3.6.9-151.el6.i686
>>>> samba-3.6.9-151.el6.i686
>>>> samba-common-3.6.9-151.el6.i686
>>>> samba-winbind-devel-3.6.9-151.el6.i686
>>>> samba-winbind-krb5-locator-3.6.9-151.el6.i686
>>>> samba-domainjoin-gui-3.6.9-151.el6.i686
>>>> samba-winbind-3.6.9-151.el6.i686
>>>> samba4-libs-4.0.0-55.el6.rc4.i686
>>>> [mlapier at mushroom samba]$ name
>>>> CentOS release 6.4 (Final)
>>>> Linux mushroom.patch 2.6.32-358.2.1.el6.i686 #1 SMP Tue Mar 12
>>>> 21:42:46 UTC 2013 i686 i686 i386 GNU/Linux
>>>> [mlapier at mushroom samba]$ testparm
>>>> Load smb config files from /etc/samba/smb.conf
>>>> Processing section "[homes]"
>>>> Processing section "[printers]"
>>>> Processing section "[pictures]"
>>>> Processing section "[budget]"
>>>> Loaded services file OK.
>>>> Server role: ROLE_STANDALONE
>>>> Press enter to see a dump of your service definitions
>>>>
>>>> [global]
>>>>      server string = Samba Server Version %v
>>>>      log file = /var/log/samba/log.%m
>>>>      max log size = 50
>>>>      printcap name = cups
>>>>      idmap config * : backend = tdb
>>>>
>>>> [homes]
>>>>      comment = Home Directories
>>>>      read only = No
>>>>      browseable = No
>>>>
>>>> [printers]
>>>>      comment = All Printers
>>>>      path = /var/spool/samba
>>>>      guest ok = Yes
>>>>      printable = Yes
>>>>      print ok = Yes
>>>>      browseable = No
>>>>
>>>> [pictures]
>>>>      comment = Pictures
>>>>      path = /home/pictures
>>>>      read only = No
>>>>      guest ok = Yes
>>>>
>>>> [budget]
>>>>      comment = Budget
>>>>      path = /home/budget
>>>>      valid users = nllapie, mlapier
>>>>      read only = No
>>>> [mlapier at mushroom ~]$
>>>>
>>>> Is there anything else I can share with you that will help you to
>>>> diagnose my problem?
>>>
>>> Have you checked the CUPS printer sharing?
>>>
>>
>> Sure enough.  The printer shared check box is checked so
>> that's not the
>> problem.
>>
>> --
>>      _
>>     °v°
>>    /(_)\
>>     ^ ^  Mark LaPierre
>> Registered Linux user No #267004
>> https://linuxcounter.net/
>> ****
>> --
>> To unsubscribe from this list go to the following URL and read the
>> instructions:  https://lists.samba.org/mailman/options/samba
>>
>>
> On 04/02/2013 02:47 AM, L.P.H. van Belle wrote:> Hai,
>
> recheck your settings in smb.conf
> This is a working setup with cups for example.
>
> ## PRINTING Section 1 !! Global Settings !!
> ## printing temporary disabled
>          load printers = Yes
>          printing = cups
>          printcap name = cups
>          show add printer wizard = Yes
>          disable spoolss = No
>          max print jobs = 100
>          lpq cache time = 20
>          use client driver = No
>          max reported print jobs = 1000
>
> # PRINTING Section 2 !!
> # users are able to connect to any printer specified in the Samba host's
> # printcap file  ( /etc/printcap ) provided through cups
> [printers]
>          comment = All Network Printers
>          printable = yes
>          path = /home/samba/spool
>          browseable = No
>          guest ok = yes
>          public = yes
>          read only = yes
>          writable = no
>          create mode = 0777
>          lpq command = /usr/bin/lpq -P '%p'
>          lprm command = /usr/bin/lprm -P '%p' %j
>          lppause command = /usr/sbin/lpc hold '%p' %j
>          lpresume command = /usr/sbin/lpc release '%p' %j
>          queueresume command = /usr/sbin/lpc start '%p'
>          queuepause command = /usr/sbin/lpc stop '%p'
>
>
> ### Printing Section 3 "The Windows Printer drivers"
> # Required permissions
> # The account used to connect to the Samba host must have
> # a UID of 0 (i.e., a root account). ( or Administrator )
> # The account used to connect to the Samba host must be
> # named in the printer adminlist.
> # Or The account used to connect to the Samba host must have
> # SEPrintOperatorRights
> [print$]
>          comment = Printer Drivers Download Area
>          path = /home/samba/printers
>          browseable = no
>          guest ok = yes
>          read only = yes
>          write list = @"Print Operators",@"Domain Admins",Administrator,root
>          create mask = 0664
>          directory mask = 0775
>          valid users = @"Domain Users",@"Print Operators",@"Domain Admins",Administrator,root
>
>
>

Okay, I pasted in your global and printers section, restarted smb 
service, deleted the printer from the Win XP machine, and then 
reconnected to it with the add printer tool on XP.  Now when I send a 
test file the file is accepted but does not print.

[root at mushroom samba]# testparm
Load smb config files from /etc/samba/smb.conf
Processing section "[homes]"
Processing section "[printers]"
Processing section "[pictures]"
Processing section "[budget]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

[global]
	lpq cache time = 20
	printcap name = cups
	idmap config * : backend = tdb
	max reported print jobs = 1000
	max print jobs = 100

[homes]
	comment = Home Directories
	read only = No
	browseable = No

[printers]
	comment = All Network Printers
	path = /home/samba/spool
	create mask = 0777
	guest ok = Yes
	printable = Yes
	print ok = Yes
	lpq command = /usr/bin/lpq -P '%p'
	lprm command = /usr/bin/lprm -P '%p' %j
	lppause command = /usr/sbin/lpc hold '%p' %j
	lpresume command = /usr/sbin/lpc release '%p' %j
	queuepause command = /usr/sbin/lpc stop '%p'
	queueresume command = /usr/sbin/lpc start '%p'
	browseable = No

[pictures]
	comment = Pictures
	path = /home/pictures
	read only = No
	guest ok = Yes

[budget]
	comment = Budget
	path = /home/budget
	valid users = nllapie, mlapier
	read only = No
[root at mushroom samba]#

[root at mushroom samba]# cat log.smbd
[2013/04/02 19:44:45,  0] smbd/server.c:1026(main)
   smbd version 3.6.9-151.el6 started.
   Copyright Andrew Tridgell and the Samba Team 1992-2011
[2013/04/02 19:47:52.807149,  0] printing/print_cups.c:1176(cups_queue_get)
   Unable to get jobs for ipp://localhost/printers//usr/bin/lpq -P 
'Samsung-ML-1740' - client-error-not-found
[2013/04/02 19:48:12.543799,  0] printing/print_cups.c:1176(cups_queue_get)
   Unable to get jobs for ipp://localhost/printers//usr/bin/lpq -P 
'Samsung-ML-1740' - client-error-not-found
[2013/04/02 19:49:47.169157,  0] printing/print_cups.c:1176(cups_queue_get)
   Unable to get jobs for ipp://localhost/printers//usr/bin/lpq -P 
'Samsung-ML-1740' - client-error-not-found
[2013/04/02 19:49:52.980884,  0] smbd/service.c:1055(make_connection_snum)
   canonicalize_connect_path failed for service Samsung-ML-1740, path 
/home/samba/spool
[2013/04/02 19:49:54.197127,  0] smbd/service.c:1055(make_connection_snum)
   canonicalize_connect_path failed for service Samsung-ML-1740, path 
/home/samba/spool
[root at mushroom samba]#

[root at mushroom samba]# cd /home/samba/spool
-bash: cd: /home/samba/spool: No such file or directory
[root at mushroom samba]#

I changed path from:
path = /home/samba/spool

to:
path = /var/spool/samba

Now the print jobs print.  Thanks.  We're almost there now.
But the Win XP print job manager says, "Access denied.  Unable to connect."

[root at mushroom samba]# cat log.smbd
[2013/04/02 20:11:50,  0] smbd/server.c:1026(main)
   smbd version 3.6.9-151.el6 started.
   Copyright Andrew Tridgell and the Samba Team 1992-2011
[2013/04/02 20:12:40.099061,  0] printing/print_cups.c:1176(cups_queue_get)
   Unable to get jobs for ipp://localhost/printers//usr/bin/lpq -P 
'Samsung-ML-1740' - client-error-not-found
[2013/04/02 20:13:15.436341,  0] printing/print_cups.c:1176(cups_queue_get)
   Unable to get jobs for ipp://localhost/printers//usr/bin/lpq -P 
'Samsung-ML-1740' - client-error-not-found
[2013/04/02 20:13:46.848789,  0] printing/print_cups.c:1176(cups_queue_get)
   Unable to get jobs for ipp://localhost/printers//usr/bin/lpq -P 
'Samsung-ML-1740' - client-error-not-found
[2013/04/02 20:18:21.643011,  0] printing/print_cups.c:1176(cups_queue_get)
   Unable to get jobs for ipp://localhost/printers//usr/bin/lpq -P 
'Samsung-ML-1740' - client-error-not-found
[root at mushroom samba]#



-- 
     _
    °v°
   /(_)\
    ^ ^  Mark LaPierre
Registered Linux user No #267004
https://linuxcounter.net/
****


More information about the samba mailing list