Jump to content
 English      
???en.wpa.text.hpweb2003.home??? ???en.wpa.text.hpweb2003.prodserv??? ???en.wpa.text.hpweb2003.support??? ???en.wpa.text.hpweb2003.solutions??? ???en.wpa.text.hpweb2003.buy???
» ???en.wpa.text.hpweb2003.contact???
     Forums advanced search
HP.com Home
IT Resource Center Forums > HP-UX > system administration

Backspace key taken as garbage during login

» 

IT Resource Center

» Login
» Register
» My profile
» Search knowledge base
» Forums
» Patch database
» Download drivers, software and firmware
» Warranty check
» Support Case Manager
» Software Update Manager
» Training and Education
» More maintenance and support options
» Online help
» Site map

Member icons
 
 HP moderator  HP moderator
 Expert in this area  Expert in this area
Member status
ITRC Pro ITRC Pro
250 points
ITRC Graduate ITRC Graduate
500 points
ITRC Wizard ITRC Wizard
1000 points
ITRC Royalty ITRC Royalty
2500 points
ITRC Pharaoh ITRC Pharaoh
7500 points
Olympian Olympian
20000 points
1-Star Olympian 1-Star Olympian
40000 points
2-Star Olympian 2-Star Olympian
80000 points
»  How to earn points
»  Support forums FAQs
Question status
Magical answer Magical answer
Message with a response that solved the author's question
Favorites status
Add to my favorites Add to my favorites
Delete from my favorites Delete from my favorites
This thread has been closed Thread closed
 

Content starts here
   Create a new message    Receive e-mail notification if a new reply is posted  Reply to this message
Author Subject: Backspace key taken as garbage during login      Add to my favorites
Vibhor Kumar Agarwal This member has accumulated 1000 or more points
Nov 5, 2009 05:26:24 GMT   

Hi,

Query about backspace key working funny on my HP systems (B.11.31 U ia64).

During login, if the user name is misspelled and then corrected by pressing the backspace key, the final name looks right on screen but login doesn't happen. This means that though the characters are deleted but the system takes backspace as some control character.

Not an serious or abnormal issue, but just wanted to check if there is an option (system configuration) to correct this.

Thanks
Note: If you are the author of this question and wish to assign points to any of the answers, please login first.For more information on assigning points ,click here


Sort Answers By: Date or Points
Johnson Punniyalingam This member has accumulated 2500 or more points
Nov 5, 2009 05:43:41 GMT  3 pts

I would like to Check TERM ?

echo $TERM
Vibhor Kumar Agarwal This member has accumulated 1000 or more points
Nov 5, 2009 05:45:21 GMT    N/A: Question Author

echo $TERM
xterm

Is the right terminal or shall i change it to vt100 or something?
Johnson Punniyalingam This member has accumulated 2500 or more points
Nov 5, 2009 05:45:44 GMT  3 pts

Once you are logged into the other computer, I believe the following command would do the job:

stty erase "^?"

which sets the erase character to "^?". See man stty for more info on "control characters" (and lots of other things too).
Johnson Punniyalingam This member has accumulated 2500 or more points
Nov 5, 2009 05:47:00 GMT  3 pts

>>is the right terminal or shall i change it to vt100 or something?

you can give a try :)
Raj D. This member has accumulated 7500 or more points
Nov 5, 2009 06:01:35 GMT  3 pts

Vibhor,
- Check # echo $TERM
- Also check the stty for backspace key by typeing:
# stty erase <Backspace key> Enter

It will look like:
# stty erase ^?


Hth,
Raj.
Vibhor Kumar Agarwal This member has accumulated 1000 or more points
Nov 5, 2009 06:39:11 GMT    N/A: Question Author

Backspace character works perfect after login.

During login, on screen it works as perfect by deleting the previous character, but the system doesn't take it.

How do i set the TERM variable for the system so that it's available for next logins?
Johnson Punniyalingam This member has accumulated 2500 or more points
Nov 5, 2009 06:50:43 GMT  3 pts

>>How do i set the TERM variable for the system so that it's available for next logins?<<

.profile

Then type in

stty erase ^?
Venkatesh BL Expert in this area This member has accumulated 2500 or more points
Nov 5, 2009 08:01:57 GMT    Unassigned

The stuff inside '$HOME/.profile' will be executed only after a successful login. So, I don't think putting 'stty erase' there would make any difference.

I think this has something to do with the default shell that is invoked by the 'login' command.
HP moderator melvyn burnard Expert in this area This member has accumulated 20000 or more points
Nov 5, 2009 08:27:35 GMT  10 pts

You don't change anything.
WHen logging in, the backspace key will NOT work, use the # key to backspace one character at a time, or use @ to erase the line and start again.
This is why these characters are NOT allowed as part of your login name or password
Dennis Handly This member has accumulated 40000 or more points
Nov 5, 2009 11:26:38 GMT  10 pts

>melvyn: You don't change anything.

That's probably a good idea. But Bill's and JRF's replies in these threads indicates you can use /dev/ttyconf.
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1217841
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1150375
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=601973
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=181001
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1066385
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=999534
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=997484
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=982939
Tingli This member has accumulated 1000 or more points
Nov 5, 2009 21:32:58 GMT  3 pts

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 Expert in this area This member has accumulated 40000 or more points
Nov 6, 2009 03:12:04 GMT  10 pts

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.
Vibhor Kumar Agarwal This member has accumulated 1000 or more points
Nov 16, 2009 11:16:51 GMT    N/A: Question Author

Thanks everybody for your inputs.
Sp4admin This member has accumulated 1000 or more points
Nov 16, 2009 21:52:05 GMT    Unassigned

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 This member has accumulated 7500 or more points
Nov 16, 2009 22:52:53 GMT    Unassigned

"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
Nov 18, 2009 14:56:44 GMT    Unassigned

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 <undef>;

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

Any clue?
Bill Hassell Expert in this area This member has accumulated 40000 or more points
Nov 20, 2009 03:08:24 GMT    Unassigned

> 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 <undef>;

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.
Aneesh Mohan Expert in this area This member has accumulated 1000 or more points
Nov 20, 2009 07:49:46 GMT    Unassigned

see the solution here

stty kill '^X' intr '^C' werase '^W' erase '^?' </dev/ttyconf


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


Aneesh
Dennis Handly This member has accumulated 40000 or more points
Nov 21, 2009 18:49:17 GMT    Unassigned

>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.
 
Create a new message    Receive e-mail notification if a new reply is posted   Reply to this message
 
 
Printable version
Privacy statement Using this site means you accept its terms
© 2009 Hewlett-Packard Development Company, L.P.