On Wednesday 13 Feb 2002 2:39 pm, Johannes Franken wrote:
> On Wed, Feb 13, 2002 at 01:39:09PM -0800, Patrick Kirk wrote:
 > > What is actually need is the netbios name that this printer appears
 > > under.
 >
 > None, for port 139 is not among.
 
Aha, a trick question eh?
 
I read over the thread again, and I'm thinking we're not `getting it'.
 
Am I right in thinking the situation is like this: you have a local network 
and remote one. And on the remote network is a printer you'd like to make 
available to Windows machines on your local network. But the only access 
you've got to the remote network is via ssh?
 
If that's it then maybe something like this would do:
 
1. Take the command you use to print when you're logged into the remote 
machine, let's say it's just `lpr', and make a shell script on your local 
machine to run it remotely:
 
e.g. /usr/local/bin/rprint:
 #!/bin/sh
 /usr/bin/ssh [EMAIL PROTECTED] lpr
 
2. Set things up so that the user used by your local print spooler, `lp', can 
log into the remote machine without a password.
 
e.g.
 # su lp
 $ ssh-keygen -t rsa
 $ cat ~/.ssh/id_rsa.pub | ssh [EMAIL PROTECTED] "cat >> .ssh/authorized_keys2"
 
Perhaps you could set up `user' on the remote machine to have minimal rights.
 
3. Set up a queue on your local machine for the remote printer, using your 
remote printing script as a filter:
 
e.g. /etc/printcap
 rlp|Remote Printer:\
         :lp=/dev/null:if=/usr/local/bin/rprint:
 
4. Then you can share 'Remote Printer' to local Windows machine using Samba.
 

Reply via email to