Operating System - HP-UX
1834497 Members
2928 Online
110067 Solutions
New Discussion

bad terminal on login prompt

 
SOLVED
Go to solution
Noam Meltzer
Advisor

bad terminal on login prompt

Hi!
When I telnet (or rsh) to my machine, the terminal of the login prompt is kinda sucky.
What do I mean?
For example, if you have a "@" in your password (it usually don't show up in your username, but i guess there too),
than in order to type that character, you'll have to type a backslash before ("\").
This applies to some other characters I do not recall at the moment.
Also, when you try to press BACKSPACE or DELETE in order to delete the last character you wrote (does not matter if its in the username or password), it won't work, just send a strange character to the terminal, and therfore screw your login attempt.

Any ideas?


10x,
Noam
HP engineers must live on Mars. Otherwise how can you explain the fact that they invented the wheel themselves?
10 REPLIES 10
Tim D Fulford
Honored Contributor

Re: bad terminal on login prompt

Hi

The sucky login sounds quite normal to me....!!

Generally when you login backspace & delete will not work... The @ sign is a sort of delete, so if i'm fulfordt and I log in you might see

login: fullf@fulfordt

This is actually just "fulfordt". I believe the same is true for the password (so do not use @).

The other characters that you prefix with \ are probably metacharacters. I'm afraid I do not know the full list of metacharacters. but you will be safe with a-z, A-Z, 0-9 these are definitely characters, \*@ are metacharacters, as for .+- etc I'm not sure.

Tim
-
Noam Meltzer
Advisor

Re: bad terminal on login prompt

well... i don't understand why you see this as a normal behaviour?!?!!?
did you ever tried to telnet/rsh a linux/solaris/IRIX/OSF machine? on such platforms you don't have that problem.
I named these platforms, because I know them, and there is no problem there.. i bet that other platforms i didn't mention here, you won't have that problem.
so yes, i call this a problem,
and defenatley NOT A REGULAR BEHAVIOUR.

Noam
HP engineers must live on Mars. Otherwise how can you explain the fact that they invented the wheel themselves?
Tim D Fulford
Honored Contributor

Re: bad terminal on login prompt

OK

sorry you are unhappy with the reply. It sounds like you are sure it poor. So some other things to look at

o Terminal emulator. Are you using Xterm/Humming bird/eXceed? or a telnet app from a PC? or are you going from a work station/server?
o Keyboard/Console map? - I'm not going to be much help here as I do not have manuals at hand. I know the B class workstations/servers had a file /etc/kbdlang I think.

Tim

-
James R. Ferguson
Acclaimed Contributor

Re: bad terminal on login prompt

Hi Noam:

The behavior of certain special characters you describe is normal for HP-UX. After all, Unix has many flavors.

If you look at the Introduction section in volume-1 of the man page manuals you will find further explanation. Specifically, "#" acts as an "erase" during login, deleting the last character typed. The "@" is a "kill" and deletes *all* characters typed on the input line. The erase, and kill characters can be used as normal text characters if you escape them with a preceding "\".

http://docs.hp.com/hpux/onlinedocs/B2355-90689/B2355-90689.html

Regards!

...JRF...

Noam Meltzer
Advisor

Re: bad terminal on login prompt

Hi James,
10x for the link and the info... I see that HP, again, decided to be unstandard... err... invent the wheel again...
Anyway, do you know if there's a way to make this more standard terminal already at login time?
I know that when you ssh into a machine the login prompt is noraml (AKA. not HPs way).
I think that it won't be unreasonable to believe that the problem consissts because the "login" utility is not linked with the appropriate library. (like libncurses.sl or something equivilant for example).

Noam
HP engineers must live on Mars. Otherwise how can you explain the fact that they invented the wheel themselves?
James R. Ferguson
Acclaimed Contributor
Solution

Re: bad terminal on login prompt

Hi (again) Noam:

Sorry, I don't know of any way to change this behavior. In fact, if you look at the man pages for 'getty (1M)' under the *BUGS* section it is noted:

/begin_quote/

While getty does understand simple single character quoting conventions, it is not possible to quote the special control characters that getty uses to determine when the end of the line has been reached, which protocol is being used, and what the erase character is. Therefore it is not possible to log in by means of getty and type a #, @, /, !, _, backspace, ^U, ^D, or & as part of your login name or arguments. They will always be interpreted as having their special meaning as described above.

/end_quote/

Regards!

...JRF...
Bill Hassell
Honored Contributor

Re: bad terminal on login prompt

Just so you understand, the # and @ symbols are very standard Unix behavior based on the history of Unix. When Unix was first created (30+ years ago), there was no such thing as a PC and glass terminals were uncommon and with any stadards. The 'normal' terminal was a teletypewriter (aka, a Teletype, most commonly the ASR33 or big brother, the ASR35). These are hardcopy devices so the concept of a backspace is meaningless.

So Unix was born with # as a substitute for the backspace key and the @ symbol defined as a KILL character. (this is a long time before Internet email existed). See man termio for details. HP-UX still honors these standard definitions during the getty/login process.

However, there is a fix:

stty kill '^X' intr '^C' erase '^W'
(this is cryptically documented in the stty man page and works for 10.20 and up)

To preserve the tty settings across a reboot, the stty command should be placed in a start-up script.

Also, these new settings will be used for all terminal ports in the system, except the system console, and the changes will not become effective for a particular port until it is (re)opened. The new settings will not work with the system console because the system console is never closed while the system
is running, and therefore cannot be reopened.


Bill Hassell, sysadmin
Noam Meltzer
Advisor

Re: bad terminal on login prompt

Hi,
first of all thanks for the help. It really worked.

Pity that HP is locked in its conservativity and doesn't look a milimeter ahead of the bubble they are leaving at.
This is just an example for HP's conservativity, and there are much more examples.
If HP would just a little bit in trying to reach up and be more sys-admin friendly and programmer friendly they might have taken a boost in its selling.

Their uncomfortable to use, and the painful porting to their enviornment (and not only because of bad code... take for example BIND 9.1) made it an unwanted platform and very hated among many unix users and especially sys-admins and sys-programers.

Noam
HP engineers must live on Mars. Otherwise how can you explain the fact that they invented the wheel themselves?
Frank Slootweg
Honored Contributor

Re: bad terminal on login prompt

Re 'HP's conservativity': This 'conservative' behaviour is defined by UNIX *standards*, see "STANDARDS CONFORMANCE" in the termio(7) manual page.

As Bill explained, the standard default can be changed, so I think HP-UX offers the best of both worlds: Standard behaviour out-of-the-box and customization if the user(s) or/and SysAdmin want(s) something different.

Given a standard and a non-standard, HP will follow the standard, i.e. "Standard is better than better.".
Noam Meltzer
Advisor

Re: bad terminal on login prompt

being conservative is not good... there's standard and there's standard.... going 10 years with the progess of technology and still remain 20 years behind is not so hard.
and doing "man" on an HP machine will sure bring you what HP wants you to hear.
It is very nice that you can define it to be as you want it... but as the default option it shouldn't be the most uncomfortable way. and definitly i don't want it to be forced on the console (true, i don't usually use it. but a kind of principal).
HP engineers must live on Mars. Otherwise how can you explain the fact that they invented the wheel themselves?