[Samba] printing and other questions

Yousef I. Adan yousef at emirates.net.ae
Thu Dec 5 05:12:01 GMT 2002


Hi Joel,

Thanks for all the counselling. We are going into a three day holiday. I
will try all those hints when I come back. In the meantime, have a nice
christmas (ours is Eid Fitr - after the Holy month of Ramadan).

BTW, I don't know what cubs is, but when I hit the printing problem I just
installed from the RPMS. I normally use the default which is LPRng, as
mentioned in the SMB.CONF.

Cheers and thank you very much.

Yousef

----- Original Message -----
From: "Joel Hammer" <Joel at HammersHome.com>
To: "Yousef I. Adan" <yousef at emirates.net.ae>; <samba at lists.samba.org>
Sent: Thursday, December 05, 2002 7:12 AM
Subject: Re: [Samba] printing and other questions


> As I recall, you are using cups?
>
> Well, it seems the job has been transferred to your linux box. And,
> linux is trying to print it.
>
> I suppose you have restarted lpd  to try to clear out this job, and you
> might try removing this stuck job from your linux print queue manually. cd
> into the queue directory as specified in /etc/printcap and rm those dfA
> and whatever named files. Then, retry.
>
> I forget what you had in your printing section for the printing parameter.
> As I recall, the default value for printing is bsd. I supply printing
> = lprng. You may need to supply printing = cups (not in man smb.conf!) or
printing = lprng.
> I wish I knew what cups is.
>
> You could go into your print queue, as specified in /etc/printcap, and cat
> the status files to look for error messages. This is probably the best
> suggestion to date.
>
> Joel
>
> On Wed, Dec 04, 2002 at 05:31:09PM +0400, Yousef I. Adan wrote:
> >
> >
> > Joel,
> >
> > After I did all that you suggested, not improvement is noticed.
> > I think I am making some obvious mistakes that probably you are not
thinking
> > about.
> >
> > Any this is the output of LPQ after I sent the jobs from the WXP.
> >
> > Sorry for the trouble.
> >
> > Yousef
> >
> >
> > ----- Original Message -----
> > From: "Joel Hammer" <Joel at HammersHome.com>
> > To: "Yousef I. Adan" <yousef at emirates.net.ae>; <samba at lists.samba.org>
> > Sent: Wednesday, December 04, 2002 4:13 PM
> > Subject: Re: [Samba] printing and other questions
> >
> >
> > > You have only one printer specified in /etc/printcap, and you use the
> > > special share [printers] to export that printer to your clients. So,
that
> > > brave print queue is supposed to handle everything you throw at it.
> > > I don't use your printing setup, and in particular, I don't know
anything
> > > about the print filter referenced in your printcap.
> > > All your stuff is autogenerated. I gave up on this auto printing stuff
a
> > > long time ago. Unless someone can tell you an easier way, I suggest
you
> > > learn to do this sort of thing manually. Printing problems never go
away,
> > > and the automatic scripts usually fail when things get at all
complicated.
> > > I used to use Redhat and got rid of that automatic regenerating of the
> > > printcap file. I suspect you could fool around with the init scripts
in
> > > /etc/rc.d/init.d (lpd is the name I suspect) and get rid of that
> > "feature."
> > > However, editing /etc/printcap.local might be an easier way.
> > > I would put in a test queue in /etc/printcap (or /etc/printcap.local)
> > > to troubleshoot this thing.
> > >
> > > Here is an example share in smb.conf:
> > >
> > > [test]
> > > comment = test queue
> > > path = /tmp
> > > read only = No
> > > create mask = 0700
> > > guest ok = yes
> > > hosts allow = 192.168.
> > > printable = Yes
> > > printing = lprng
> > >         print command = echo "Tried to print %s" >
/tmp/MessageToYousef
> > > #        print command = /usr/bin/lpr -Ptest %s; rm %s
> > > lpq command = /usr/bin/lpq -Ptest
> > > lprm command = /usr/bin/lprm -Ptest %j
> > > lppause command = /usr/sbin/lpc hold test %j
> > > lpresume command = /usr/sbin/lpc release test %j
> > >
> > > Make sure to run testparm and restart samba after making this change.
> > >
> > > I specify everything the queue needs to know. Note I use /tmp as the
> > > print spooler. You could use /MySpooler, if it exists, but make sure
that
> > it
> > > allows everyone to read and write it.
> > > The printing process with samba is simple. The client passes the job
to
> > > samba, which stores it in /tmp/sambasuppliedname. Then, samba simply
> > invokes the
> > > print command you give it in the queue, as above. With my bogus
command,
> > > the print job will not be removed after it is sent to your spooler.
> > > You can then see if the job got there, and see what format the job is
in.
> > > If the job arrived as expected, we can move on from there.
> > > I don't know if you need a test printer definition in your
> > > /etc/printcap.local. This might work:
> > >
> > > test:\
> > >   :sd=/var/spool/lpd/test:\
> > >   :mx#0:\
> > >   :lp=/tmp/printout:\
> > >   :sh:
> > >
> > > Make sure the file /tmp/printout exists and is world writable and
> > > readable.  With lprng, I run checkpc -f after making new printcap
> > > entries. It generates the appropriate /var/spool files. I am not sure
> > > what you have to do on your system.
> > >
> > > Joel
> > >
> > > On Wed, Dec 04, 2002 at 09:24:21AM +0400, Yousef I. Adan wrote:
> > > > Here it's (or rather here they are).
> > > >
> > > > Thanks Joel, for your help.
> > > >
> > > > Yousef
> > > >
> > > >
> > > > ----- Original Message -----
> > > > From: "Joel Hammer" <Joel at HammersHome.com>
> > > > To: "Yousef I. Adan" <yousef at emirates.net.ae>;
<samba at lists.samba.org>
> > > > Sent: Wednesday, December 04, 2002 3:13 AM
> > > > Subject: Re: [Samba] printing and other questions
> > > >
> > > >
> > > > > To which queue are the print jobs being sent from the window's
client.
> > > > > Post your smb.conf and printcap files.
> > > > > Joel
> > > > > On Tue, Dec 03, 2002 at 05:20:26PM +0400, Yousef I. Adan wrote:
> > > > > > On the Linux side  I am selecting text only or raw when creating
the
> > > > printer
> > > > > > and in both cases it is printing(locally). The printer is an HP
> > laserjet
> > > > 6L
> > > > > > and doesn't support PS.
> > > > > >
> > > > > > >From the Win XP,I just grab the printer and say connect and
load
> > the
> > > > proper
> > > > > > driver. When I check (now) the print processor is showing raw
but I
> > > > normally
> > > > > > don't select at this level.
> > > > > >
> > > > > > Now, on the linux side when I run LPQ, there is s some thing
like
> > Error
> > > > > > Aborting Operations, coming from root at localhost+697. I don't
know
> > what
> > > > that
> > > > > > means.
> > > > > >
> > > > > > The thing used to work easily without any meddling from my side,
by
> > just
> > > > > > creating, restarting SMB and picking it up from the Win xp side,
> > thru
> > > > the
> > > > > > samba shares.
> > > > > >
> > > > > > Thanks.
> > > > > >
> > > > > > Yousef
> > > > > >
> > > > > >
> > > > > > ----- Original Message -----
> > > > > > From: "Joel Hammer" <Joel at HammersHome.com>
> > > > > > To: "Yousef I. Adan" <yousef at emirates.net.ae>;
> > > > <sed-users at yahoogroups.com>
> > > > > > Sent: Tuesday, December 03, 2002 4:32 PM
> > > > > > Subject: Re: [Samba] printing and other questions
> > > > > >
> > > > > >
> > > > > > > Which queue are you sending your print jobs to from the
windows
> > > > client? It
> > > > > > > needs to be a raw queue without a filter.
> > > > > > >
> > > > > > > Joel
> > > > > > >
> > > > > > > On Tue, Dec 03, 2002 at 10:31:44AM +0400, Yousef I. Adan
wrote:
> > > > > > > > I am facing a little problem with printing.
> > > > > > > > Linux Box RH 8.0 Samba 2.2.7. Everything was OK. Dunno what
I
> > did.
> > > > Now,
> > > > > > eventhough I can see the printer share and connect to it from my
WXP
> > > > PRO,
> > > > > > when I send a print, nothing happens. Even If I watch the queue
from
> > the
> > > > > > WXP, I can see that nothing is going thru this port. Where is
the
> > file
> > > > > > going? If I check the printer properties (ports), it seems that
this
> > > > > > particular printer is not point to anywhere. I don't even know
> > whether
> > > > the
> > > > > > problem is from the XP side or Linux side. I know that the
printer
> > is
> > > > > > configured properly on the Linux and is printing from there. I
am
> > > > attaching
> > > > > > my SMB.conf as it's now. I am not a Linux expert. Just starting,
so
> > > > don't
> > > > > > take for granted that I checked the easiest parts even. Thanks
in
> > > > advance.
> > > > > > > >
> > > > > > > > Yousef
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > > > #
> > > > > > > > #======================= Global Settings
> > > > > > =====================================
> > > > > > > > [global]
> > > > > > > >
> > > > > > > > # workgroup = NT-Domain-Name or Workgroup-Name
> > > > > > > >    workgroup = WXPGRP
> > > > > > > >
> > > > > > > > # server string is the equivalent of the NT Description
field
> > > > > > > >    server string = Samba Server
> > > > > > > >
> > > > > > > >    printcap name = /etc/printcap
> > > > > > > >    load printers = yes
> > > > > > > >
> > > > > > > >    printing = lprng
> > > > > > > >
> > > > > > > >    log file = /var/log/samba/%m.log
> > > > > > > >
> > > > > > > >    max log size = 0
> > > > > > > >
> > > > > > > >    security = user
> > > > > > > >
> > > > > > > >    encrypt passwords = yes
> > > > > > > >    smb passwd file = /etc/samba/smbpasswd
> > > > > > > >
> > > > > > > >    unix password sync = Yes
> > > > > > > >    passwd program = /usr/bin/passwd %u
> > > > > > > >    passwd chat = *New*password* %n\n *Retype*new*password*
%n\n
> > > > > > *passwd:*all*authentication*tokens*updated*successfully*
> > > > > > > >
> > > > > > > >    pam password change = yes
> > > > > > > >
> > > > > > > >   obey pam restrictions = yes
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >    dns proxy = no
> > > > > > > >
> > > > > > > >
> > > > > > > > #============================ Share Definitions
> > > > > > ==============================
> > > > > > > > [homes]
> > > > > > > >    comment = Home Directories
> > > > > > > >    browseable = no
> > > > > > > >    writable = yes
> > > > > > > >    valid users = %S
> > > > > > > >    create mode = 0664
> > > > > > > >    directory mode = 0775
> > > > > > > >
> > > > > > > >
> > > > > > > >  [printers]
> > > > > > > >    comment = All Printers
> > > > > > > >    path = /var/spool/samba
> > > > > > > >    browseable = yes
> > > > > > > > # Set public = yes to allow user 'guest account' to print
> > > > > > > >    guest ok = no
> > > > > > > >    writable = no
> > > > > > > >    printable = yes
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > >
> > > > #
> > > > #======================= Global Settings
> > =====================================
> > > > [global]
> > > >
> > > > # workgroup = NT-Domain-Name or Workgroup-Name
> > > >    workgroup = WXPGRP
> > > >
> > > > # server string is the equivalent of the NT Description field
> > > >    server string = Samba Server
> > > >
> > > >    printcap name = /etc/printcap
> > > >    load printers = yes
> > > >
> > > >    printing = lprng
> > > >
> > > >    log file = /var/log/samba/%m.log
> > > >
> > > >    max log size = 0
> > > >
> > > >    security = user
> > > >
> > > >    encrypt passwords = yes
> > > >    smb passwd file = /etc/samba/smbpasswd
> > > >
> > > >    unix password sync = Yes
> > > >    passwd program = /usr/bin/passwd %u
> > > >    passwd chat = *New*password* %n\n *Retype*new*password* %n\n
> > *passwd:*all*authentication*tokens*updated*successfully*
> > > >
> > > >    pam password change = yes
> > > >
> > > >   obey pam restrictions = yes
> > > >
> > > >
> > > >
> > > >    dns proxy = no
> > > >
> > > >
> > > > #============================ Share Definitions
> > ==============================
> > > > [homes]
> > > >    comment = Home Directories
> > > >    browseable = no
> > > >    writable = yes
> > > >    valid users = %S
> > > >    create mode = 0664
> > > >    directory mode = 0775
> > > >
> > > >
> > > >  [printers]
> > > >    comment = All Printers
> > > >    path = /var/spool/samba
> > > >    browseable = yes
> > > > # Set public = yes to allow user 'guest account' to print
> > > >    guest ok = no
> > > >    writable = no
> > > >    printable = yes
> > > >
> > > >
> > > >
> > >
> > > > # printcap.local
> > > > #
> > > > # This file is included by printconf's generated printcap,
> > > > # and can be used to specify custom hand edited printers.
> > > >
> > > >
> > >
> > > > # /etc/printcap
> > > > #
> > > > # DO NOT EDIT! MANUAL CHANGES WILL BE LOST!
> > > > # This file is autogenerated by printconf-backend during lpd init.
> > > > #
> > > > # Hand edited changes can be put in /etc/printcap.local, and will be
> > included.
> > > >
> > > > hplj6:\
> > > > :ml#0:\
> > > > :mx#0:\
> > > > :sd=/var/spool/lpd/hplj6:\
> > > > :af=/var/spool/lpd/hplj6/hplj6.acct:\
> > > > :sh:\
> > > > :lp=/dev/lp0:\
> > > > :lpd_bounce=true:\
> > > > :if=/usr/share/printconf/util/mf_wrapper:
> > > >
> > > >
> >
############################################################################
> > ###
> > > > ## Everything below here is included verbatim from
/etc/printcap.local
> > ##
> > > >
> >
############################################################################
> > ###
> > > > # printcap.local
> > > > #
> > > > # This file is included by printconf's generated printcap,
> > > > # and can be used to specify custom hand edited printers.
> > > >
> > > >
> > >
> > >
> > > --
> > > To unsubscribe from this list go to the following URL and read the
> > > instructions:  http://lists.samba.org/mailman/listinfo/samba
>
> > Printer: hplj6 at lnxws
> >  Queue: 1 printable job
> >  Server: pid 1949 active
> >  Unspooler: pid 1983 active
> >  Status: attempt 3, sleeping 20 before retry at 17:28:09.435
> >  Rank   Owner/ID                  Class Job Files                 Size
Time
> > active(attempt-3) yousef at lnxws+948  A   948 Ptest,smbprn.000038. 14824
17:27:59
> > error  yousef at lnxws+717             A   717 ERROR: job removal requested
> >
>




More information about the samba mailing list