?
Solved

ptty to a specific  ip address

Posted on 2002-03-19
5
Medium Priority
?
395 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 400 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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.
For many of us, the  holiday season kindles the natural urge to give back to our friends, family members and communities. While it's easy for friends to notice the impact of such deeds, understanding the contributions of businesses and enterprises i…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses

752 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