Operating System - HP-UX
1753789 Members
7932 Online
108799 Solutions
New Discussion юеВ

Re: Backspace key taken as garbage during login

 
SOLVED
Go to solution
Tingli
Esteemed Contributor

Re: Backspace key taken as garbage during login

If you use Putty, you can try this.

In Putty, go to Terminal -> Keyboard.

You will see the "The Backspace key", pickup control-?(127) and see how it works.
Bill Hassell
Honored Contributor

Re: Backspace key taken as garbage during login

This is not a problem with $TERM or Putty or profiles. This is a feature of the tty driver, much like the default baud rate for a serial port (300 baud). It's hard coded to the same value it was in the 1980's. Here are the details:

The default settings for the terminal driver is @=delete-line and #=backspace. Every HP-UX system since the 1980's has used these defaults. The reason is historic as these characters were used with hardcopy terminals where a backspace key cannot erase the ink on the paper. Today, they get in the way and your standard /etc/profile will have two stty statements that set the 'normal' characters for delete-line and backspace. However, /etc/profile does not run until after you login so it does not affect the login and passwd programs.

If you are running 10.20 or any version of 11.xx you can fix this using the ttyconf device file. Do this once while you are running:

stty erase "^H" kill "^U" < /dev/ttyconf

and now backspace will work for login, and @ can be used in a password. It will take effect for all new logins except for the console (which is opened at bootup). To set the console login, you'll need to create a small startup script the runs early in the boot process.


Bill Hassell, sysadmin
Vibhor Kumar Agarwal
Esteemed Contributor

Re: Backspace key taken as garbage during login

Thanks everybody for your inputs.
Vibhor Kumar Agarwal
Sp4admin
Trusted Contributor

Re: Backspace key taken as garbage during login

You need to check the term type. Type "env" and see what the term value is set to. then type TERM=vt100 or hpterm. If that doesn't work then do stty erase ^?.

sp,
OldSchool
Honored Contributor

Re: Backspace key taken as garbage during login

"You need to check the term type. Type "env" and see what the term value is set to. then type TERM=vt100 or hpterm. If that doesn't work then do stty erase ^?."

that DOESN'T apply until AFTER login, whch the OP isn't referring to
Kavitha_K
New Member

Re: Backspace key taken as garbage during login

Hi,
On a 11.31 ia64; I am seeing this same issue of backspace causing garbled login credentials.
I used following to get backspace to work even at login, as suggested above;
stty erase "^H" kill "^U" < /dev/ttyconf

But, doesn't ^H translate to shift+backspace ?

So, on the same lines, I tried doing;
stty erase "^?" kill "^U" < /dev/ttyconf

It succeeded in setting;
stty < /dev/ttyconf
erase = DEL; kill = ^U;
swtch ;

But, this doesn't resolve the issue of garbled input at login if I use backspace now!

Any clue?
Bill Hassell
Honored Contributor

Re: Backspace key taken as garbage during login

> On a 11.31 ia64; I am seeing this same issue of backspace causing garbled login credentials.

I don't understand the term "login credentails". Are you talking about login and password? When you say garbled, do you mean that typing abc produces a string like Cgfc$3(55?

> I used following to get backspace to work even at login, as suggested above;
stty erase "^H" kill "^U" < /dev/ttyconf
> But, doesn't ^H translate to shift+backspace ?

No, the nomenclature "^H" translates to control-H and on a normal keyboard, this produces the backspace character (see man ascii). DEL is the delete character which matches the "^?" stty setting.

> So, on the same lines, I tried doing;
stty erase "^?" kill "^U" < /dev/ttyconf
>
> It succeeded in setting;
> stty < /dev/ttyconf
> erase = DEL; kill = ^U;
> swtch ;

And that is correct, but not what most users want. Use the command:

stty erase "^H" < /dev/ttyconf

Then use the backspace key. Note that all of this applies to terminal sessions such as xterm, hpterm and dtterm. If you are filling a special form in Xwindows, then ttyconf probably won't help.


Bill Hassell, sysadmin
Aneesh Mohan
Honored Contributor

Re: Backspace key taken as garbage during login

see the solution here

stty kill '^X' intr '^C' werase '^W' erase '^?'

http://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1387943


Aneesh
Dennis Handly
Acclaimed Contributor

Re: Backspace key taken as garbage during login

>Bill: the nomenclature "^H" translates to control-H and on a normal keyboard, this produces the backspace character. DEL is the delete character which matches the "^?" stty setting. ...
>And that is correct, but not what most users want.

Unfortunately some new fangled windows and other terminal emulator use DEL and not control-H.
But since I use both interchangeably and I'm been using computers a long time and I'm used to the DEL key doing nothing, I use ^H. And ^X for kill.