[Samba] Print server on all linux network
Dan Sawyer
dsawyer at blenderwars.com
Sun Oct 6 07:39:01 GMT 2002
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Okay, Joel, after another bit of futzing around, here's what I've come up
with.
The files dumped using the command you told me to DO indeed write postscript
files to the directory in question. However every attempt to print those
files on the server fail. However, .txt files and others print properly from
the server. This leads me to believe that, somehow, the NEC Superscript
printer that's running on an HP2P ghostscript driver is somehow not a
postscript printer (though it quite apparently IS a postscript printer as far
as I can tell). Making that change (disabling postscript) has at least
gotten me to the point where I can make the printer lights blink (when
attempting to print from the client from any KDE/X program), though as yet
nothing is actually printing. Add to that one more layer of wierdness: When
printing text files from the client, the print job executes using the shell
command (cat filename.txt | smbclient //bob/nec -c 'print - '. However, when
printing a file from an X program to the server, all I get are the pretty
blinking lights.
This leads me to the reasonable conclusion that the problems (after disabling
postscript) are client-based, involving a misconfiguration of some sort. So,
here's my client's /etc/printcap file. I notice with great dismay that
nothing in it actually directs me to anything on the network...
- ----------------------
BEGIN CLIENT /etc/printcap:
# /etc/printcap: printer capability database. See printcap(5).
# You can use the filter entries df, tf, cf, gf etc. for
# your own filters. See the printcap(5) manual page for further
# details.
#
# Default Postscript printer on "print-serv"
#lp|ps|postscript:\
# :client:lp=postscript at print-serv
#lp|ps|postscript:\
# :server:oh=print-serv:\
# :sd=/var/spool/lpd/ps:\
# :lp=/dev/lp1:\
# :sh:mx#0
#
# Fax-Printer for SuSEFax
#
fax|faxprint:\
:lp=/dev/null:\
:sd=/var/spool/lpd/faxspool:\
:lf=/var/spool/lpd/faxspool/err.log:\
:if=/var/spool/lpd/faxspool/filter:\
:mx#0:\
:sh:\
:sf:
### BEGIN apsfilter: ### /etc/gs.upp/y2prn_nec.upp nec ###
# Warning: Configured for apsfilter, do not edit the labels!
# apsfilter setup Sat Oct 5 23:10:36 PDT 2002
#
nec-ascii|lp1|y2prn_nec.upp--ascii-nec|y2prn_nec.upp ascii:\
:lp=/dev/null:\
:sd=/var/spool/lpd/y2prn_nec.upp--ascii-nec:\
:lf=/var/spool/lpd/y2prn_nec.upp--ascii-nec/log:\
:af=/var/spool/lpd/y2prn_nec.upp--ascii-nec/acct:\
:if=/var/lib/apsfilter/bin/y2prn_nec.upp--ascii-nec:\
:la@:mx#0:\
:tr=:cl:sh:
#
nec|lp2|y2prn_nec.upp--auto-nec|y2prn_nec.upp auto:\
:lp=/dev/null:\
:sd=/var/spool/lpd/y2prn_nec.upp--auto-nec:\
:lf=/var/spool/lpd/y2prn_nec.upp--auto-nec/log:\
:af=/var/spool/lpd/y2prn_nec.upp--auto-nec/acct:\
:if=/var/lib/apsfilter/bin/y2prn_nec.upp--auto-nec:\
:la@:mx#0:\
:tr=:cl:sh:
#
nec-raw|lp3|y2prn_nec.upp--raw-nec|y2prn_nec.upp raw:\
:lp=/dev/null:\
:sd=/var/spool/lpd/y2prn_nec.upp--raw-nec:\
:lf=/var/spool/lpd/y2prn_nec.upp--raw-nec/log:\
:af=/var/spool/lpd/y2prn_nec.upp--raw-nec/acct:\
:if=/var/lib/apsfilter/bin/y2prn_nec.upp--raw-nec:\
:la@:mx#0:\
:tr=:cl:sh:
#
### END apsfilter: ### /etc/gs.upp/y2prn_nec.upp nec ###
- -----------------------------
Or, it could be a combination of server and client based. Allow me to
explain.
When plugging my laptop into a network with a windows based print server, I
can set up the client's printer in YAST2 by telling YAST2 to browse the
network and picking the appropriate name for the server and the que, and it
prints without a hitch. However, on my all-linux network, when I try to
browse with YAST2 it can't find any hosts. But (to make things even more
fun), browsing with LinNeighborhood allows me to see the print que.
Now, here's the smb.conf from the server:
_____________________________
# Samba config file created using SWAT
# from 192.168.1.100 (192.168.1.100)
# Date: 2002/10/06 00:52:46
# Global parameters
[global]
workgroup = AWP
netbios name = BOB
server string = file and print server
encrypt passwords = Yes
update encrypted = Yes
map to guest = Bad User
null passwords = Yes
large readwrite = Yes
max smbd processes = 100
socket options = SO_KEEPALIVE IPTOS_LOWDELAY TCP_NODELAY
character set = ISO8859-15
os level = 2
preferred master = True
hosts allow = 192.168.1.100 192.168.1.101 192.168.1.102 192.168.1.103
hosts deny = ALL
[homes]
comment = Home Directories
path = /home/burnboy
read only = No
create mask = 0640
directory mask = 0750
guest ok = Yes
max connections = 4
write cache size = 262144
fstype = Samba
[nec]
comment = NEC Superscript 1200
path = /tmp
read only = No
create mask = 0700
guest ok = Yes
hosts allow = 192.168.
printable = Yes
print command = /usr/bin/lpr -Pnec %s
lpq command = /usr/bin/lpq -Pps
lprm command = /usr/bin/lprm -Pps %j
lppause command = /usr/sbin/lpc hold z53 %j
lpresume command = /usr/sbin/lpc release z53 %j
printer name = nec
share modes = No
_______________________________
So, that's where I sit now. It feels like it's getting closer, but I'm
missing one or two crucial things that are probably niggling little details.
I really appreciate the help, Joel.
Do you have any further advice?
Thanks!
- -Dan
On Friday 04 October 2002 15:47, Joel Hammer wrote:
> Well, this is progress.
> This means that the file has been transferred to the samba server.
> Now, I would look at the spool directory given in your smb.conf share
> definition, and make sure the file got there.
> It may have been removed via the printing command in your share.
> (I blush to say I didn't save your smb.conf)
> Now, once it is there, I would try to print it with the command given in
> your smb.conf printer definition.
> This sounds like either a simple printer misconfiguration in smb.conf, or
> you need a different print filter.
> Can you print text files from the server with the same command you have in
> your smb.conf?
> Joel
>
> On Fri, Oct 04, 2002 at 10:05:14AM -0700, Dan Sawyer wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Well, I now got a positive response from the console, but nothing
> > printed. Here's the console dump:
> > thedude at floyd:~> cat kittykey.txt | smbclient //bob/nec -c 'print -'
> > added interface ip=192.168.1.100 bcast=192.168.1.255 nmask=255.255.255.0
> > Got a positive name query response from 192.168.1.101 ( 192.168.1.101 )
> > Password:
> > Domain=[AWP] OS=[Unix] Server=[Samba 2.2.1a]
> > putting file - as stdin-8361 (1.7 kb/s) (average 1.7 kb/s)
> >
> > - -Dan
> >
> > On Thursday 03 October 2002 21:54, Joel Hammer wrote:
> > > Try putting a space between print and -
> > > Joel
> > >
> > > On Thu, Oct 03, 2002 at 09:32:49PM -0700, Dan Sawyer wrote:
> > > > -----BEGIN PGP SIGNED MESSAGE-----
> > > > thedude at floyd:~> cat kittykey.txt | smbclient //bob/nec -c 'print-'
> > > > added interface ip=192.168.1.100 bcast=192.168.1.255
> > > > nmask=255.255.255.0 Got a positive name query response from
> > > > 192.168.1.101 ( 192.168.1.101 ) Password:
> > > > Domain=[AWP] OS=[Unix] Server=[Samba 2.2.1a]
> > > > print-: command not found
> >
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.0.6 (GNU/Linux)
> > Comment: For info see http://www.gnupg.org
> >
> > iD8DBQE9ncpOaB8ur/y6V8gRAoSDAJ9362kOuDev9LG4JnJ+ZapLBm31EwCeOsFP
> > hFK5IHwDMCilV8987pWzTx8=
> > =ajN9
> > -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE9n+oDaB8ur/y6V8gRAgSQAJwI2uWmGhWruNm6i31YaRPjDp8giQCffZNC
SA2q3Ah0RQaj5hB6+E4DapY=
=trHp
-----END PGP SIGNATURE-----
More information about the samba
mailing list