[Samba] Re: SAMBA 2.2.3a <-> LPRng 3.8.x

Patrick Powell papowell at astart.com
Wed Feb 20 07:02:10 GMT 2002


The 'problem' (Sigh... note the quotes, guys)

is that Samba, bless its little heart,  it trying desperately
to deal with the fact that it has to map 'UNIX' print jobs to
'SMB' print jobs.  The way that it tries to do this is by
putting in a 'magic cookie' in the job name using the lpr '-Jcookie'
option.  After spooling the job it then uses 'lpq' to scan the
queue to get the print job.

There are two solutions to this:

a)  add a new option to lpr to cause it to attach
    an explict magic cookie to the job that can be
    used for removal:

    lpr --cookie=...

    lprm --cookie=...

    and update Samba to use it...

b)  Do not use -J, let Samba have it...

c)  us 'lp', not lpr,  and get the request id:

    h110: {144} % lp /tmp/hi
    request id is papowell at h110+786

    Sigh...
  
> From christoph.beyer at desy.de Fri Feb 15 05:34:00 2002
> From: christoph.beyer at desy.de
> Date: Fri, 15 Feb 2002 14:33:53 +0100 (MET)
> To: Gerald Carter <jerry at samba.org>, <samba at lists.samba.org>,
>    <lprng at lprng.com>, <papowell at astart.com>, <darin at astart.com>
> Subject: SAMBA 2.2.3a <-> LPRng 3.8.x
>
> hi you all,
>
> I had this problem for a long time and with different versions of SAMBA
> and LPRng:
>
> using '/usr/spool/lp/bin/lpr -r -Fl -m%m -J"%J" -U%U -P%p %s'
> as 'print command' results in two jobs in the queue window on the NT box,
> though there is only one job in the unix queue.
>
> using '/usr/spool/lp/bin/lpr -r -Fl -m%m -U%U -P%p %s'
> works fine, but delete requests often (not always) don't succeed, the job
> in the queue window just gets renamed, from it's original name to the name
> in the unix queue.
>
> Is there a little problem in the internal name mapping ?
>
> my smb.conf file:
>
> [global]
>         workgroup = DESYNT
>         netbios name = DESYNTPRINTA
>         security = SERVER
>         encrypt passwords = Yes
>         password server = %m
>         printcap name = /usr/spool/lp/etc/printcap.smb
>         wins server = 131.169.69.32
>         remote announce = 131.169.69.36
>         remote browse sync = 131.169.69.36
>         admin users = lp
>         printer admin = lp
>         guest ok = YES
>         printing = lprng
>         map to guest = Bad Password
>         print command = /usr/spool/lp/bin/lpr -r -Fl -m%m -U%U -P%p %s
>         lpq command = /usr/spool/lp/bin/samba/%u/lpq -P%p
> #       lpq command = /usr/spool/lp/bin/lpq -P%p
>         lprm command = /usr/spool/lp/bin/lprm -U%U -P%p %j
>         username map = /usr/spool/lp/etc/smbusers.map
>         deadtime = 1
>
> [print$]
>         path = /usr/spool/samba/printers
>         write list = lp
>         read only = Yes
>         guest ok = Yes
>         browseable = Yes
>
> [printers]
>         path = /tmp
>         printable = Yes
>         guest ok = Yes
>         browseable = Yes
>
>
>
>
> [printsrv2] /usr/spool/samba $ cat ~lp/etc/smbusers.map
> !lp = lp
> nobody = *
>
>
> kind regards
> 	~christoph
>
>




More information about the samba mailing list