Solved

ptty to a specific  ip address

Posted on 2002-03-19
5
378 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
I had an issue with InstallShield not being able to use Computer Browser service on Windows Server 2012. Here is the solution I found.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
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…

914 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

18 Experts available now in Live!

Get 1:1 Help Now