Solved

ptty to a specific  ip address

Posted on 2002-03-19
5
375 Views
Last Modified: 2013-12-23
I have a site that are moving (slowly) from serial to IP
They all user the same username to login (accounting software - cobol - not my choice).
The software uses a script to assign a terminal number based on the line eg tty1a1 = terminal 1 ptty2
= terminal 7 etc etc.

My problem.
Now they are moving to ip the user will get a random ptty session and the terminal number changes. the
stupid accounting program uses terminal numbers to identify such things as print jobs.

Can you make a user on a fixed ip address get a specifc ptty session ?  eg 198.168.1.1 get ptty0 and
or ptty1 etc etc
0
Comment
Question by:Zombite
  • 2
  • 2
5 Comments
 
LVL 38

Expert Comment

by:yuzh
ID: 6881802
which favour of UNIX are you using?

I don't thing you can assign the tty to a fix IP, but if you write a script, it can detect which tty the usr is using and then passed it to your application.



0
 
LVL 4

Author Comment

by:Zombite
ID: 6882307
Openserver SCO 5.0.5

The application (cobol) already runs a script that checks the tty# and sets the terminal number.
Mutter, I can change the script and... hopefully the cobol ppl won't overwrite it again. Just thought if there was any op sys method to detect ip and etc etc but if the script is the only way to go then I will re open my scipting book ;-)
0
 
LVL 38

Expert Comment

by:yuzh
ID: 6884380
I have used SCO OpenServer 5.X a few years ago, I think you end up have to write a script to get the remote IP and pass it to your application.

Do you have tcsh install on your system? tcsh by default it
have a Env var $REMOTEHOST to tell you the remote machine name or ip (you can convert the machine name back to ip if the out put is the machine name).

It is possible to do it with the other shell, but you need to do a lot more.
0
 
LVL 3

Accepted Solution

by:
UkWizard earned 100 total points
ID: 6887219
yep, only answer is to write a script ( or modify the current one ) so that it finds the IP address and then passes this to the program.

The cobol script may just run the 'tty' command to discover the tty port, in which case you could make a script to overwrite this variable.

Never tryed this personally though, be better to modify there script.
0
 
LVL 4

Author Comment

by:Zombite
ID: 6887984
Script is the wat to go it appears.
Thanks to all
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Article by: IanTh
Hi Guys After a whole weekend getting wake on lan over the internet working, I thought I would share the experience. Your firewall has to have a port forward for port 9 udp to your local broadcast x.x.x.255 but if that doesnt work, do it to a …
When it comes to security, there are always trade-offs between security and convenience/ease of administration. This article examines some of the main pros and cons of using key authentication vs password authentication for hosting an SFTP server.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

762 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

21 Experts available now in Live!

Get 1:1 Help Now