Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 406
  • Last Modified:

ptty to a specific ip address

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
Zombite
Asked:
Zombite
  • 2
  • 2
1 Solution
 
yuzhCommented:
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
 
ZombiteAuthor Commented:
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
 
yuzhCommented:
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
 
UkWizardCommented:
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
 
ZombiteAuthor Commented:
Script is the wat to go it appears.
Thanks to all
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now