[H-GEN] Samba & Printers

Tony Nugent tony at linuxworks.com.au
Thu Mar 7 22:42:50 EST 2002


[ Humbug *General* list - semi-serious discussions about Humbug and  ]
[ Unix-related topics.  Please observe the list's charter.           ]
[ Worthwhile understanding: http://www.humbug.org.au/netiquette.html ]

On Thu Mar 07 2002 at 11:27, "Christian \"Vic\" Bullow" wrote:

> Sorry, with what I do Windows OS's seem to be a necessary evil.

  (I'm in the same position... linux boxes doing all the grunt work
  for a network of windows users/clients.  Windows is a
  FactOflife(tm), gotta live with it and keep people happy :)

> In smb.conf I will copy those lines I think are relevant;
> 
> [global]
>    printing = bsd

But later you specify lprng.

>    printcap name = /etc/printcap

(Default, not needed).

>    load printers = yes

I tend to use "load printers = no", otherwise the printer shares are
called "lp", "lp0" and so on (whatever the first printcap name is).

> [printer]

This is a _new_ share name, so now you have two printers, "raw" (the
default), and "printer".  Probably not what you want.

>    comment = Raw Printer Share
>    path = /var/spool/lpd/samba

I assume that this spool directory has workable permissions.  (Owner
root.root and mode 1777 works like /tmp, can this can probably be
tightened).

>    public = Yes
>    printer admin = administrator, vicomte
>    create mask = 0777
>    guest ok = Yes
>    printable = Yes
>    writeable = No
>    printing = lprng

Here "lprng" contradicts the global setting.  It looks like you are
using lprng here...

>    print command = /usr/bin/lpr -U%U@%M -r -P%p %s
>    lpq command = /usr/bin/lpq -U%U@%M -P%p
>    lprm command = /usr/bin/lprm -U%U@%M -P%p %j
>    lppause command = /usr/sbin/lpc -U%U@%M hold %p %j
>    lpresume command = /usr/sbin/lpc -U%U@%M release %p %j
>    queuepause command = /usr/sbin/lpc  -U%U@%M -P%p stop
>    queueresume command = /usr/sbin/lpc -U%U@%M -P%p start

Why the -U (run as user) parameter here with a FQDN, why?
Specifying users as -Uuser at netbios_name might be upsetting things.
I don't use -U at all, and it works just fine.  The print jobs can
be also be run as the "samba guest account", allowing anyone to
delete any print job (handy in an office network).

  BTW, all windows users have /bin/false unix shell accounts.  I'm
  sure it would work ok with winbind if you are using that.

>    printer name = raw
>    use client driver = Yes

Hmm... "use client driver" is not in the versions of samba I 
using (2.2.1, 2.0.10)  Is this a a 2.2.3 thing?

Here is an example of a config that I know works...

[HP4000N]
;  force user		= smbguest
   printable		= yes
   print ok		= yes
   guest ok		= no
   printer driver	= HP LaserJet 4000 Series PCL 6
   comment		= HP LaserJet 4000N Printer
   path			= /var/spool/samba/hp4000n
   print command	= /usr/bin/lpr	-r -Plp0 %s
   lpq command		= /usr/bin/lpq	-Plp0
   lprm command		= /usr/bin/lprm -Plp0 %j
   lppause command	= /usr/sbin/lpc	hold lp0 %j
   lpresume command	= /usr/sbin/lpc	release lp0 %j
   queuepause command	= /usr/sbin/lpc	-Plp0 stop
   queueresume command	= /usr/sbin/lpc	-Plp0 start

  (I should probably use %p instead of lp0).

I have printcap to use the lp0 printer as what it really is, the
winblows clients also have the right printer driver installed
installed for that printer.  Everything works as expected.

> The printer is recognised on boot by the kernel, I can print locally
> from the server to the printer but can't be printed from over the
> network. The printer is shared and can be seen from over the network.
> Drivers are installed locally, but Win2k can't activate a connection to
> the printer.

What are samba logs telling you?  (You might need to increase debug
level a tiny bit).

> Idea's would be appreciated. Assistance would be greatly appreciated.
> 
> Regards
> Christian

What I'd like to know is how to use is a [printer$] section with a
"printer driver location" directive pointing to it.  This would make
installing printers onto winclient boxes a real snap.  I've never
been able to get this to work right.

  (Apparently a lot of this sort of printer management functionality
  has changed/improved in subsequent versions of samba).

Cheers
Tony
---*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=---
  Tony Nugent <Tony at linuxworks.com.au>
  LinuxWorks - Gold Coast Qld Australia

--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.



More information about the General mailing list