Solved

Printing form linux --> Win95 with samba

Posted on 1997-03-03
1
252 Views
Last Modified: 2010-03-18
Hello,
I have one computer (thor.duijnhoven) with linux and I want to print on a
W95 computer (wodan.duijnhoven).
So I used samba.
I can ping this computer, and I can even print when I use
smbclient on the command line.
But when I use lp and I look use lpc to see what the status
is it says. Waiting for wodan.duijnhoven to come up.
My printcap file:
epson|peter|netwerk|Epson Stylus:\
:lp=:rm=WODAN.DUIJNHOVEN:\
      :rp=EPSON PEER:\
      :sd=/usr/spool/lpd/epsonstylus:\
      :lf=/usr/spool/lpd/epsonstylus/errs:\
      :if=/usr/local/samba/bin/smbprint:\
        :df=/var/spool/lp1/filter.ps:\
        :tf=/var/spool/lp1/filter.ps:\
        :af=/var/spool/lp1/lp-acct:\

0
Comment
Question by:marcd022697
1 Comment
 
LVL 2

Accepted Solution

by:
dux earned 50 total points
ID: 1584000
Put the following line in /etc/printcap:

lp:lp=/dev/null:sd=/usr/spool/lp1:sh:if=/usr/local/samba/smbprint

smbprint is a script used for printing with samba:


#!/bin/sh -x

# ...

eval acct_file=\$$#
spool_dir=`dirname $acct_file`
# Should read the following variables set in the config file:
#   server
#   service
#   password
eval `cat $config_file`echo "server $server, service $service" >> $logfile

(
# NOTE You may wish to add the line `echo translate' if you want automatic
# CR/LF translation when printing.
#       echo translate
        echo "print -"
        cat
) | /usr/local/samba/bin/smbclient "\\\\dana\\ibm" -N -P >> $logfile



config_file=$spool_dir/.config


0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now