Operating System - HP-UX
1825667 Members
4030 Online
109686 Solutions
New Discussion

HELP! regarding device file /dev/tty's (HP-UX 10.20) and /dev/pts's (HP-UX 11.0) of TELNET teletd

 
ivanng
Occasional Advisor

HELP! regarding device file /dev/tty's (HP-UX 10.20) and /dev/pts's (HP-UX 11.0) of TELNET teletd

Hello all! nice to meet you!!

My question is very simple as follows,

In HP-UX 10.20, TELNET uses device file under /dev/tty's

But in HP-UX 11.0 TELNET uses device file under /dev/pts's instead of tty.

Due to some reasons (compatiblality of an application with the HP OS), is it possible to change the device file used in TELNET under HP-UX 11.0 back to /dev/tty's instead of using /dev/pts's (by default)???
(i know it is part of problems of the executables of telnet, telnetd, tels something like that)

And, the most important is, how to make such changes??? Can any HP-UX professionals can tell?

I appreciate if 'you' can tell me.

Thanks a lot!!!!


peace.

Ivan

 

 

Moved from HP-UX Technical Documentation to HP-UX > sysadmin

 

17 REPLIES 17
Mark Grant
Honored Contributor

Re: HELP! regarding device file /dev/tty's (HP-UX 10.20) and /dev/pts's (HP-UX 11.0) of TELNET teletd

Simplest way would be to create the directory yourself and use either hard or soft links to the pty's.
Never preceed any demonstration with anything more predictive than "watch this"
ivanng
Occasional Advisor

Re: HELP! regarding device file /dev/tty's (HP-UX 10.20) and /dev/pts's (HP-UX 11.0) of TELNET teletd

hi, mark,

really thanks for your FAST reply.
;)

anyway, i don't understand much on what you mean. ;(

Umm..in my case, i just want to use device file, /dev/tty's under HP-UX 11.0 when receiving client TELNET's request.

Thanks!
Sanjay Kumar Suri
Honored Contributor

Re: HELP! regarding device file /dev/tty's (HP-UX 10.20) and /dev/pts's (HP-UX 11.0) of TELNET teletd

As Mark said:

Use ln command create a soft/hard link.

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
KapilRaj
Honored Contributor

Re: HELP! regarding device file /dev/tty's (HP-UX 10.20) and /dev/pts's (HP-UX 11.0) of TELNET teletd

1. Please avoid posting same queestions more than once.

If you can let us know why you have to do this , we will work out a better solution rather than linking devicefiles which is really time consuming

Regds,

Kaps
Nothing is impossible
Mark Grant
Honored Contributor

Re: HELP! regarding device file /dev/tty's (HP-UX 10.20) and /dev/pts's (HP-UX 11.0) of TELNET teletd

Ivan,

Create your /dev/tty directory and use "ln" to link all the files in your "pty" directory to the /dev/tty directory. These links will mean you have two names for each pty. The original one and your linked one. Both will be functionally equivalent.

This might not be enough for you but I think it's the best you can do.
Never preceed any demonstration with anything more predictive than "watch this"
ivanng
Occasional Advisor

Re: HELP! regarding device file /dev/tty's (HP-UX 10.20) and /dev/pts's (HP-UX 11.0) of TELNET teletd

Again, thanks for the reply, Sanjay, Kapil and Mark.

Umm.. it is difficult to tell the whole story here. Maybe I make a summary.


We need to migrate a application form HP-UX 10.20 to HP-11.0

After we upgrade the OS to 11.0, the application fails to be run from terminal client connection through TELNET. I can login but when i tried to execute application functions, there is an error.

Instead, it is ok for the console login (throught COM port directly using like hyperterminal). The application works perfectly. Here we found that the there is no problem of the application with device files used in OS HP-UX 10.20 is under /dev/tty's, while the problem exists in HP-UX 11.0 with device file changed to /dev/pts's. It seems application cannot the output to /dev/pts's, but only output to /dev/tty's.


So.........
That's why I am asking if the device file, /dev/tty's (like /dev/ttypd etc.) can be used instead of /dev/pts's (like /dev/pts/ta) under HP-UX 11.0


ivanng
Occasional Advisor

Re: HELP! regarding device file /dev/tty's (HP-UX 10.20) and /dev/pts's (HP-UX 11.0) of TELNET teletd

Attached please find the device used in HP-UX 11.0 and HP-UX 10.20 under TELNET session.

KapilRaj
Honored Contributor

Re: HELP! regarding device file /dev/tty's (HP-UX 10.20) and /dev/pts's (HP-UX 11.0) of TELNET teletd

What is the error ?. Is it a shell script ?

Kaps
Nothing is impossible
ivanng
Occasional Advisor

Re: HELP! regarding device file /dev/tty's (HP-UX 10.20) and /dev/pts's (HP-UX 11.0) of TELNET teletd

the error is,

"Redirection or piping of stdin or stdout is allowed only with -b. (156)"

which displayed on screen

honestly, i am not 100% the problem is related to device file.

But seems it is a problem of the change on TELNET, telnetd (like device file i mentioned) between HP-UX 10.20 and 11.0


;(

Mark Grant
Honored Contributor

Re: HELP! regarding device file /dev/tty's (HP-UX 10.20) and /dev/pts's (HP-UX 11.0) of TELNET teletd

Then this isn't a problem with the pty's. It is some command that needs a "-b" to do the job you expect of it. telnetd does, indeed have a "-b" option but I can't see how it fits in here but it may. I think you are going to have to talk to the application vendors to find out what it is doing.
Never preceed any demonstration with anything more predictive than "watch this"
ivanng
Occasional Advisor

Re: HELP! regarding device file /dev/tty's (HP-UX 10.20) and /dev/pts's (HP-UX 11.0) of TELNET teletd

According HP technical document,

=====================
For 10.30:

Beginning with HP-UX 10.30, the pseudo-terminal in the telnet/telnetd
internet service uses two STREAMS-based pseudo-terminal drivers (telm and
tels). Because of this, you must tune NSTRTEL, a new kernel parameter for
telnet pseudo-terminals.

NSTRTEL specifies the number of telnet slave devices to be created. The
number of telnet sessions is limited by the value of NSTRTEL. The default
value of NSTRTEL is 60 and the maximum possible value is set by MAX_STRTELS.
Note that if you want to change the value of NSTRTEL, you can use SAM, but
you can only increase the value beyond the default of 60 (you cannot make the
value less than 60). If you do increase the value, the additional devices
will automatically be created. If a user tries to telnet to a system that
does not have any telnet pseudo-terminals available, an appropriate error
message is displayed.

The device files are placed in /dev/pts and are named "t0", "t1", and so on.

=====================


anyway, anyone can help?? ;(
ivanng
Occasional Advisor

Re: HELP! regarding device file /dev/tty's (HP-UX 10.20) and /dev/pts's (HP-UX 11.0) of TELNET teletd

>uses two STREAMS-based pseudo-terminal drivers (telm and
tels).


for 'man'ing the tels(7), I got following description:

tels(7)

NAME
tels, telm - STREAMS Telnet slave (pseudo-terminal) driver, STREAMS
Telnet master driver (used by telnetd only), respectively

SYNOPSIS
#include
#include

int open("/dev/pts/tN", O_RDWR);

DESCRIPTION
.......
.......
ivanng
Occasional Advisor

Re: HELP! regarding device file /dev/tty's (HP-UX 10.20) and /dev/pts's (HP-UX 11.0) of TELNET teletd

mark, you just pointed out on thing.

the option '-b'...

umm..
I have tried to run the application using the option '-b', yes, it works BUT it is in BATCH mode instead of correct mode. So, it should be run under '-b'.

anyway, i do want to ask the application vendor but i am out of the maintance. The vendor didn't even answer me anything.

-_-

Ummm.. but how come?
the application works under HP-UX 10.20 and NOT under 11.0

I am quite sure it is due to the change of TELNET/telnetd.

Mark Grant
Honored Contributor

Re: HELP! regarding device file /dev/tty's (HP-UX 10.20) and /dev/pts's (HP-UX 11.0) of TELNET teletd

It may well be. But as an example, suppose your application needs to run the telnetd program itself. I'm not saying it does but this is an example. Say on 10.20 telnetd doesn't have a "-b" but on 11.0 it does. If the functionality of the "-b" option is available on 10.20 without the "-b" then you are going to have to persuade your application to use "telnetd -b" on 11.0 instead of just "telnetd".

I'm not saying this IS the problem but I can't see why an application would have a problem with telnet at all. It shouldn't care. the only little thing I can see that might relate to the "-b" on telnetd is if the application itself runs telnetd but attempts to change the banner heading (because that's what the -b does for telnetd)

I realise this isn't too helpful.
Never preceed any demonstration with anything more predictive than "watch this"
ivanng
Occasional Advisor

Re: HELP! regarding device file /dev/tty's (HP-UX 10.20) and /dev/pts's (HP-UX 11.0) of TELNET teletd

ok..
thanks mark....
thanks a lot.

but....

can anothers give me more assistance please.

thanks.


KapilRaj
Honored Contributor

Re: HELP! regarding device file /dev/tty's (HP-UX 10.20) and /dev/pts's (HP-UX 11.0) of TELNET teletd

Ivan,

Sorry I am not able to get in to the root cause. But surely I would ask you to test the script with debugging turned-on "set -x" and look where it is failing . Surely it is not with devicefiles !

I would find out what all system commands are executed in your script and then compare the man page in 10.20 and 11.0 and looking for a -b option which is needed in 11 and not in 1020


Regds,

Kaps
Nothing is impossible
ivanng
Occasional Advisor

Re: HELP! regarding device file /dev/tty's (HP-UX 10.20) and /dev/pts's (HP-UX 11.0) of TELNET teletd

thanks Kapil..

thanks for the assistance.