[Samba] Printing - "lprm command" not getting executed
David Neilson
DNeilson at westfam.com
Thu Dec 12 19:12:01 GMT 2002
Joel:
At first, I thought I could delete the files. What would happen is the
Window client's Printer Status Window would show them as deleted, and after
I killed the hung application, the print job would start (after a few
minutes delay). Note that the hung application could be Notepad or Word
(which were the only two I tried).
At the time that was happening, the only entry in the lpd.perms file was
DEFAULT ACCEPT.
Now, however, I changed lpd.perms to have the following entries:
ACCEPT SERVICE=C,M REMOTEIP=172.16.0.0/255.255.0.0
DEFAULT ACCEPT
Now I am able to delete documents from the Windows PC, but the application
(Notepad or Word) will hang.
I have not yet tried the suggestions from your latest email, but I will and
get back to you with that information as soon as I do.
Thanks for your help.
-----Original Message-----
From: Joel Hammer [mailto:Joel at HammersHome.com]
Sent: Wednesday, December 11, 2002 6:18 PM
To: David Neilson; samba at lists.samba.org
Subject: Re: [Samba] Printing - "lprm command" not getting executed
I thought that you were able to delete files but that the client was hanging
up?
Joel
On Wed, Dec 11, 2002 at 05:46:38PM -0800, David Neilson wrote:
> Joel:
>
> I gave the printer its own queue (/tmp), and set printing = lprng. Still
> nothing. I have looked in the log files, both samba and system, and there
> is nothing. The bottom line is that the lprm command is never getting
> called. Do you have any other ideas? Thanks.
>
> -----Original Message-----
> From: Joel Hammer [mailto:Joel at HammersHome.com]
> Sent: Monday, December 09, 2002 4:25 PM
> To: David Neilson; samba at lists.samba.org
> Subject: Re: [Samba] Printing - "lprm command" not getting executed
>
>
> You shouldn't be hanging on the client side.
>
> You might try:
> Making a queue just for your printer, not the generic %p.
> Put printing = lprng in the share.
> Look at the log files for error messages.
> This would include the smbd log files as well as the printer log files.
> /var/messages might even contain something.
>
> Does this only happen with word?
> Joel
>
>
>
> On Mon, Dec 09, 2002 at 02:02:37PM -0800, David Neilson wrote:
> > Joel:
> >
> > Thanks for the suggestions. I tried them out and now can delete files,
> > though it hangs the application on the PC (i.e., if trying to print from
> > Word to a Samba printer and purge the Word doc, then Word hangs). But,
> > thanks for your help.
> >
> > -----Original Message-----
> > From: Joel Hammer [mailto:Joel at HammersHome.com]
> > Sent: Thursday, December 05, 2002 2:33 PM
> > To: David Neilson; samba at lists.samba.org
> > Subject: Re: [Samba] Printing - "lprm command" not getting executed
> >
> >
> > Here is what I used for one share. Looks like yours.
> >
> > [Win4LinZ53]
> > comment = Raw Printer for Z53
> > path = /tmp
> > create mask = 0700
> > guest ok = yes
> > hosts allow = 192.168.
> > printable = Yes
> > printing = lprng
> > print command = echo %p %s >> /tmp/junkJ; /usr/bin/lpr -PWin4LinZ53
> > -J'%J' %s; rm %s
> > lpq command = /usr/bin/lpq -PWin4LinZ53
> > lprm command = /usr/bin/lprm -PWin4LinZ53 %j
> > lppause command = /usr/sbin/lpc hold -PWin4LinZ53 %j
> > lpresume command = /usr/sbin/lpc release -PWin4LinZ53 %j
> > printer name = lp
> > share modes = No
> >
> > There is a file, /etc/lpd.perms, whose syntax is awful.
> > I have one line in mine:
> > DEFAULT ACCEPT
> > Other problems come to mind, mainly, permissions.
> > Joel
> >
> > On Thu, Dec 05, 2002 at 12:30:39PM -0800, David Neilson wrote:
> > On Thu, Dec 05, 2002 at 12:30:39PM -0800, David Neilson wrote:
> > > I am attempting to get printing services for Windows 2000 clients
> working
> > > with Samba on a Red Hat 7.2 box. The problem is I can not cancel
print
> > jobs
> > >
> > > (either from a PC or the local smb client). File sharing, and
printing
>
> > > other than this problem, work fine.
> > >
> > > Here is a listing of configuration and system info: 1) the samba
> packages
> >
> > > installed, 2) output of "uname -a", 3) the relevant parts of the
> smb.conf
> > > file, 4) printing capabilities which work, and 5) more detailed
> > information
> > > about the problem.
> > >
> > >
> > > 1) SAMBA PACKAGES
> > > samba-2.2.1a-4
> > > samba-common-2.2.1a-4
> > > samba-client-2.2.1a-4
> > >
> > >
> > > 2) RED HAT LINUX
> > > Linux pegasus 2.4.7-10 #1 Thu Sep 6 17:27:27 EDT 2001 i686 unknown
> > >
> > >
> > > 3) EXCERPTS FROM SMB.CONF
> > > [global]
> > > # workgroup = NT-Domain-Name or Workgroup-Name
> > > workgroup = WIN # A W2K DOMAIN
> > >
> > > # server string is the equivalent of the NT Description field
> > > domain logons = yes
> > >
> > > # if you want to automatically load your printer list rather
> > > # than setting them up individually then you'll need this
> > > printcap name = /etc/printcap
> > > load printers = yes
> > >
> > > # It should not be necessary to spell out the print system type unless
> > > # yours is non-standard. Currently supported print systems include:
> > > # bsd, sysv, plp, lprng, aix, hpux, qnx
> > > printing = bsd ### I HAVE ALSO TRIED lprng, AND LEAVING THIS
> COMMENTED
> > > OUT.
> > >
> > > # Security mode. Most people will want user level security. See
> > > # security_level.txt for details.
> > > security = domain
> > >
> > > # You may wish to use password encryption. Please read
> > > # ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
> > > # Do not enable this option unless you have read those documents
> > > encrypt passwords = yes
> > > smb passwd file = /etc/samba/smbpasswd
> > >
> > > printer admin = tiberius,dneilson,root
> > > print command = /usr/bin/lpr -r -P%p %s
> > > lpq command = /usr/bin/lpq -P%p %j
> > > lprm command = /usr/bin/lprm -P%p %j
> > > queuepause command = /usr/sbin/lpc stop %p
> > > queueresume command = /usr/sbin/lpc start %p
> > >
> > > #============================ Share Definitions
> > > ==============================
> > > [lp11]
> > > comment=David's Printer
> > > path=/var/spool/samba/public
> > > valid users=dneilson mellwein
> > > printer=lp11
> > > printable=yes
> > > printer admin=tiberius,dneilson,root
> > > print command=/usr/bin/lpr -r -P%p %s
> > > lprm command=/usr/bin/lprm -P%p %j
> > > public=yes
> > >
> > >
> > > 4) PRINTING CAPABILITIES THAT WORK
> > > I can print from the local smbclient as well as any Windows 2000
client
> I
> > > choose. I am able to pause and unpause the print queue. I have not
had
>
> > > any problem printing any kind of document in the correct format.
> > >
> > >
> > > 5) MORE DETAILS OF THE PROBLEM.
> > > When I try to delete a job, Samba gives the indication it deleted the
> job.
> > > On a Windows 2000 client, after I delete the job and hit Refresh, the
> job
> > > is gone. On the local smbclient, after I cancel the job and type
> "queue",
> > > the job is gone. But in both cases, if I type lpstat -t from the
> server
> > > command line, the job is still out there.
> > >
> > > This problem can't be specific to Samba 2.2.1a, because I have tried
it
> on
> > > a machine with 2.2.7, and have gotten the same results.
> > >
> > > In troubleshooting, I changed the "lprm command" line to read: "lprm
> > > command=/tmp/lprm %p %j". The /tmp/lprm script consists of the
> following:
> > > #### START SCRIPT /tmp/lprm
> > > /usr/bin/id > /tmp/lprm.out
> > > /usr/bin/lprm -P$1 $2 >> /tmp/lprm.out 2>&1
> > > #### END SCRIPT /tmp/lprm
> > > When I cancel jobs, this script should at least create an output file,
> > > but it doesn't - which indicates it doesn't get run. As a result, I
> think
> > > Samba is not paying any attention to the "lprm command" line in the
> > > smb.conf. Be aware that "testparm" will show the "lprm command" as
> having
> >
> > > the correct parameters (/usr/bin/lprm -P%p %j).
> > >
> > > I have checked the samba log files, and they are not written to when I
> > > try to cancel jobs.
> > >
> > > I have tried running a trace of the smbd command when I try to cancel
> > jobs,
> > > and here is the output. It is only one line long:
> > > ### START strace OUTPUT
> > > select(1024, [9 10], NULL, NULL, NULL <unfinished ...>
> > > ### END strace OUTPUT
> > >
> > > >From the Unix command line, if I run the lprm command as myself
> > (dneilson)
> > > "lprm -Plp11 <JOB_ID>", I can delete the job without any problem.
> > >
> > >
> > > Thanks for any help you can provide.
> > >
> > > David Neilson
> > >
> > > --
> > > To unsubscribe from this list go to the following URL and read the
> > > instructions: http://lists.samba.org/mailman/listinfo/samba
More information about the samba
mailing list