[Samba] Samba Printing

Martin Zielinski mz at seh.de
Thu Aug 26 06:45:34 GMT 2004


On Wednesday 25 August 2004 17:39, Douglas Sterner wrote:
> Using Samba 3.05 and cups I'm having some trouble getting documents to
> print thru CUPS in raw mode. Documents print fine from the server but not
> from an XP client. When I used  the following print
> command statement for troubleshooting the job is getting to the Samba

CUPS printing uses the cups API for printing. If your print commands would 
have any effect, you are not using CUPS as printing backend!

Try "ldd smbd | grep cups" to make shure, you are really using CUPS!

> server spool directory for that printer. The CUPS admin page never sees
> the job and no errors are given. 

> Everything looks like it has printed just nothing comes out of the printer. 

This is, why network printing is so exciting ;-)

> When I print a test page from the server 
> it prints and the job shows up in cups.
>
> print command = cp %s /var/spool/samba/dell5300n/testprint.prn
>
> Question 1: What is a print command to use for raw printing thru cups

None. See above. 

>
> Question 2: What are the correct permissions user/group for the
> /var/spool/samba/dell5300n  spool directory.

I see no reason for having different spool directories. Samba takes the job 
and gives it to CUPS (so it will be copied into the CUPS spooldir anyway).

Try 0777 for it. And if works, you can think about security things later.
Unsufficient rights can really be the reason. Perhaps try:
su <user who cannot print>
cd <spooldir of the printer>
touch test

and see what happens.

>
>
> [global]
>
>         server string = Camp Hill File/Print Server
>         printcap name = cups
>         printer admin = dsterner
>         guest ok = Yes
>         printing = cups
>         cups options = raw

This is not needed:

>         print command = /usr/bin/lpr -d%p %s
> # print command = /usr/bin/lp -c -d%p -oraw
> # print command = cp  %s /var/spool/samba/dell5300n/testprint.prn
>         lpq command = /usr/bin/lpstat -o '%p'
>         lprm command = /usr/bin/cancel '%p-%j'
>         lppause command = /usr/bin/lp -i '%p-%j' -H hold
>         lpresume command = /usr/bin/lp -i '%p-%j' -H resume
>         queuepause command = /usr/bin/disable '%p'
>         queueresume command = /usr/bin/enable '%p'
>

[ EO not needed]

> [printers]
>         comment = CHPA - Complete printer share
>         path = /var/spool/samba
>         printer admin = @ntadmin, root, dsterner
>         printable = Yes
>         browseable = No
>
> [print$]
>         comment = Printer Driver Download Area
>         path = /data/samba/drivers
>         write list = @ntadmin, root, dsterner
>         guest ok = Yes
>
> [scans]
>         comment = Scanned documents from the Dell 1600N Printers
>         path = /data/samba/shared/printer-scans
>         read only = No
>         force create mode = 0755
>         force directory mode = 0755
>
> [CH-5300N]
>         comment = CH Operations Dell 5300N Laser Jet
>         path = /var/spool/samba/dell5300n
>         printer admin = @ntadmin, root
          ^^^^^^^^^^^^^               
Not quite shure, but I think, there is only one printeradmin in Samba - not 
per printer. If this overwrites the previous entry, "dsterner" is no printer 
admin.

>         hosts allow = 192.168.10.
>         guest ok = Yes
>         printable = Yes
>         printer name = CH Operations Dell 5300N Laser Jet
>
> Douglas Sterner

Please try Samba 3.0.6. Gerald Carter has fixed several tings in printing 
since 3.0.5. Just to be shure...

-- 
Martin Zielinski                       mz at seh.de
Software Development
SEH Computertechnik GmbH     www.seh.de


More information about the samba mailing list