Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

ptty assignment to specific ip addresses

Posted on 2002-03-19
4
Medium Priority
?
250 Views
Last Modified: 2010-03-18
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
4 Comments
 
LVL 40

Accepted Solution

by:
jlevie earned 400 total points
ID: 6881740
Not if the users will be connecting from workstations with, say telnet. Typically the ptys will be associated with IP's in the order that the connections are made. And if a user that used pty5 for one session logged out, say to go to lunch, they aren't likley to get that same pty when they return from luch if others have logged in during the interium.

I'd think that the way to solve the problem would be to run a script at logon that associates a 'terminal number' based on the IP that connects. Then modify the application to look at a file containing the 'terminal numbers' for the purposes the tty device was used before.
0
 
LVL 4

Author Comment

by:Zombite
ID: 6882303
The application (cobol) already runs a script that checks the tty# and sets the terminal number.
Mutter, I can change the script but... 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 40

Expert Comment

by:jlevie
ID: 6887439
I thoght I remembed someone having asked about a similar problem in the past. I found the reference and while it's not exactly the same problem it's close enough. The answer in that case turns out to be the same as here. Basically, if you need to associate an IP with some unique identifier for a legacy program to use it'll have to be done after the user has logged in by a script or program.
0
 
LVL 4

Author Comment

by:Zombite
ID: 6887983
Ill accept the first script answer ;-)
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

610 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