Stty settings before login


 
Thread Tools Search this Thread
Operating Systems AIX Stty settings before login
# 1  
Old 09-03-2010
Stty settings before login

Hello.

I'm experiencing a frustrating issue.

I'm using an old, unsupported terminal client (QVT) with AIX 6.1 using ssh2. I've come up with some stty settings that allow full usage of the system but to do so I've had to set "igncr". While this works fine once the user is logged in there are issues when creating a password.

When the user sets a new password of 7 characters and then hits enter a character appears to be added to the end as part of the <enter> (don't know which character - it's invisible because it's a password). When the user then tries to log in with the client's password popup it then doesn't match the original password.

If, when entering the new password, it is committed with ctrl-j instead of <enter> we have no problem so I'm assuming that if the stty settings within the users' .profiles were to be applied before the login prompt the problem would be solved, but I can see no way of doing this. The other alternative is the rather inelegant solution of mapping the enter key to "^j" within the terminal client - I would rather avoid this.

Can any provide any way of changing the stty default settings before the new password prompts?

Many thanks.
# 2  
Old 09-03-2010
The default stty settings for unix are to treat Carriage-Return (aka Enter) as Line-Feed (aka Newline):
Code:
-inlcr -igncr icrnl

What you you get for "stty -a" before modifying the settings in .profile?
This User Gave Thanks to methyl For This Post:
# 3  
Old 09-03-2010
Thanks for replying.

The default settings are:

Code:
 
$ stty -a
speed 0 baud; 24 rows; 132 columns;
eucw 1:1:0:0, scrw 1:1:0:0:
intr = ^@; quit = ^@; erase = ^@; kill = ^@; eof = ^@; eol = ^@
eol2 = ^@; start = ^@; stop = ^@; susp = ^@; dsusp = ^Y; reprint = ^@
discard = ^O; werase = ^W; lnext = ^@
-parenb -parodd cs5 -cstopb -hupcl cread -clocal -parext
-ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -iuclc
-ixon -ixany -ixoff -imaxbel
isig icanon -xcase echo echoe echok -echonl -noflsh
-tostop echoctl -echoprt -echoke -flusho -pending -iexten
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel tab3
$

Hitting the return key with these settings gives me "^M" and I'm assuming that this is the character getting added onto the end of the passwords:

Code:
 
$
ksh: ^M:  not found.
$
ksh: ^M:  not found.
$

If I then do an stty sane I get a sort of double-enter each time:

Code:
 
$ stty sane
$
$ $
$ $

Stty igncr sorts me out nicely:

Code:
 
$ stty igncr
$
$
$

I have the QVT terminal client's Newline setting as "LF" (not "CRLF" or "CR").
# 4  
Old 09-03-2010
usually the client can be set. Try to find a setup.
If not.
when are you logging something ask you about TERM?
what do you ask?
when you are loggined what your $TERM
Code:
echo $TERM

This User Gave Thanks to john1212 For This Post:
# 5  
Old 09-03-2010
My $TERM is currently "vt220". I can change it to "vt100" and "vt52" on QVT but, as far as I can tell, all three of them react the same to the return key (certainly after login, I haven't checked the password problem with vt100 or vt52).
# 6  
Old 09-03-2010
I assume that this is a "telnet" client not a serial terminal.
The issue seems to be that the terminal emulator is identifying itself as a terminal type which is not in the termcap database. Also, the "enter" key appears to be generating carriage-return and line-feed like an old teletype.
I wonder what value you use for $TERM .
# 7  
Old 09-03-2010
Quote:
Originally Posted by methyl
Also, the "enter" key appears to be generating carriage-return and line-feed like an old teletype.
Yes. This seems to be the case even though I don't have the client set to "CRLF".

Perhaps there is something that can be done with the terminfo files in /usr/share/lib/terminfo to persuade AIX to ignore the <CR>s that I can't find a way to stop sending.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. OS X (Apple)

Where does OS X store LDAP and login settings?

I'm writing scripts to check for compliance with the DISA STIG. Several items refer to manually click-click-clicking to verify settings regarding LDAP or accounts like guest account disabled, "Allow Guests to connect to shared folders", "Display login window as:", "Show input menu in login... (7 Replies)
Discussion started by: jnojr
7 Replies

2. Shell Programming and Scripting

How to use stty?

Hi , I have shell scripting in linux box. This script is mentioned that should be run under the one particular user. If you run that mentioned user location then it is working fine.... Suppose if you are trying run from some other user like as mentioned below sudo su - gxadm -c script.sh ... (1 Reply)
Discussion started by: Mani_apr08
1 Replies

3. Shell Programming and Scripting

Use of stty vs trap in script-driven login menu

My employers would like me to selectively run one of several different (already-existing) Korn Shell menu-driven scripts out of the user's .profile file, depending on some yet-to-be-specified user critieria. I've never done this kind of thing, but I have the existing scripts (among other... (5 Replies)
Discussion started by: Clovis_Sangrail
5 Replies

4. OS X (Apple)

What settings are required for login to CVS using Terminal in Mac OS X?

Hi All, I want to login to CVS using terminal. I am executing the following command in the terminal :- export CVSROOT=: pserver:ags_rd@istcvs.corp.apple.com:/istcvs/CVSHOME cvs login But i get the following error : Afreens-iMac:buildTest Afreen$ export CVSROOT=:... (1 Reply)
Discussion started by: Afreen
1 Replies

5. Shell Programming and Scripting

What settings are required for login to CVS using Terminal in Mac OS X?

Hi All, I want to login to CVS using terminal. I am executing the following command in the terminal :- export CVSROOT=: pserver:ags_rd@istcvs.corp.apple.com:/istcvs/CVSHOME cvs login But i get the following error : Afreens-iMac:buildTest Afreen$ export CVSROOT=:... (3 Replies)
Discussion started by: Afreen
3 Replies

6. OS X (Apple)

Using stty

Hello, I am trying to configure a serial port, for mac os x 10.6. I believe I can use the stty command to look at serial port configuration and or change the serial port settings. I read the man page, but I don't really know what I am doing. Any help? (0 Replies)
Discussion started by: jamesapp
0 Replies

7. UNIX for Advanced & Expert Users

stty: : Not a typewriter -- Help please

Hi All, I have been runing the same set of program using the same auto profile for an year. Now when i run the same set of process , i getting the below error Not a terminal stty: : Not a typewriter stty: : Not a typewriter ksh: jil: not found ksh: sendevent: not found logout... (4 Replies)
Discussion started by: arunkumar_mca
4 Replies

8. UNIX for Advanced & Expert Users

stty erase r

after hitting this command...on pressing r acts as a backspace character.... how to disable this function (5 Replies)
Discussion started by: bishweshwar
5 Replies

9. UNIX for Dummies Questions & Answers

stty

I am trying to set my backspace key as the erase key right now I have to type CONTROL-H to delete. Can you please tell me the command to set my backspace as the erase key...... (1 Reply)
Discussion started by: frank
1 Replies
Login or Register to Ask a Question