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@h110+786
Sigh...
> From [EMAIL PROTECTED] Fri Feb 15 05:34:00 2002
> From: [EMAIL PROTECTED]
> Date: Fri, 15 Feb 2002 14:33:53 +0100 (MET)
> To: Gerald Carter <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>,
> <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
> 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
>
>
-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address
If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body. For the impatient,
to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED]
with: | example:
subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED]
If you have major problems, send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------