If this isn't exactly what you wanted, please try our Search (there's a LOT of techy and non-techy stuff here about Linux, Unix, Mac OS X and just computers in general!):
From: Jeff Liebermann <jeffl@comix.santa-cruz.ca.us> Subject: Re: Telnet printing Message-ID: <odog10pq7dl9ha1q2cht2292et1j2haenm@4ax.com> References: <LNWdnfBPhsoFm4XdRVn-sA@thebiz.net> Date: Thu, 29 Jan 2004 01:47:33 GMT On Wed, 28 Jan 2004 13:59:30 -0500, "Robert Bachellor" <rob@alphaomegas.com> wrote: >We have a remote client using DSL with dynamic IP addressing to telnet back >into the SCO OS5 server. He is using ICE.TCP Pro which comes with an LPD >program for Windows. My problem is how to define a printer on the server so >that his reports go to his LPD interface so he can print them.
Back in the bad old days of Unix (before VPN's), I had a similar
problem. IP addresses were assigned on the fly by a DHCP server. I
only had a maximum of 10 such dynamic IP's in the pool so I created 10
printers. I was sorta forced to use LPR/LPD because it was the most
common protocol available in a scrambled mess of operating systems and
print server boxes. There were some dialin users, so static DHCP by
MAC address was not an option. The customer did not want to deal with
a DNS server. Everyone logged into the order system with the same
login (not my idea), so I couldn't assign printers by login name.
I named the printers by appending the last part of the IP address to a
generic name. For example:
192.168.0.100 = printer100
192.168.0.101 = printer101
(...)
192.168.0.110 = printer110
On login, I extracted the DHCP assigned IP address using something
like:
IP=`who -mx | awk '{print $6}'`
I then peeled off the last 3 digits with:
NUMB=`who -mx | awk '{print $6}' | cut -c 10-`
Finally, I assigned the default printer environment variable LPDEST to
the proper printer number with something like:
LPDEST="printer"$NUMB ; export $LPDEST
About 2 years later, I discovered VPN's, disarmed this abomination,
removed the print server daemons from the client machines, simplified
my life, and lived happily ever after.
--
# Jeff Liebermann 150 Felker St #D Santa Cruz CA 95060
# 831.336.2558 voice http://www.LearnByDestroying.com
# jeffl@comix.santa-cruz.ca.us
# 831.421.6491 digital_pager jeffl@cruzio.com AE6KS
/Bofcusm/2431.html copyright 1997-2004 (various authors) All Rights Reserved
Have you tried Searching this site?
Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates
This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.
Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.
Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.
We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.
Click here to add your comments
Don't miss responses! Subscribe to Comments by RSS or by Email
Click here to add your comments
If you want a picture to show with your comment, go get a Gravatar