- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: login prompt Qn #1
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2002 06:07 PM
11-19-2002 06:07 PM
login prompt Qn #1
On some boxes, if I mistype the login id or password before I hit
I would like to learn how this is set up.
TIA,
Shahril
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2002 06:16 PM
11-19-2002 06:16 PM
Re: login prompt Qn #1
You mean like the behaviour of
stty kill @
??
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2002 06:50 PM
11-19-2002 06:50 PM
Re: login prompt Qn #1
However, you can change every login (serial, modem, telnet, etc) by using this construct:
stty erase "^H" < /dev/ttyconf
This will set the driver options for all connections prior to login. It takes effect immediately except for the serial console port which will require a reboot. This works on current versions of HP-UX with appropriate patches.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2002 05:22 PM
11-26-2002 05:22 PM
Re: login prompt Qn #1
stty -a reports the current option settings.
How do I inspect the default settings so that if I do not like the behaviour of my "stty .... < /dev/ttyconf" command, I can revert it?
Also, is kill the option for "cancel line"?
TIA,
Shahril
ps. been away for a while
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2002 06:58 PM
11-26-2002 06:58 PM
Re: login prompt Qn #1
Yes, stty kill ^U "cancel's" the line
If you change the behaviour and you don't like it, just change it back.
If you do it just for your session, when you logout, it will be reset.
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2002 11:16 AM
11-28-2002 11:16 AM
Re: login prompt Qn #1
to see the "default" settings simply do an "stty sane" first, then the already mentioned "stty -a".
HP-UX uses the very classical convention of "kill ^@", but Solaris and Linux do not!
HTH,
Wodisch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2002 04:55 PM
11-28-2002 04:55 PM
Re: login prompt Qn #1
So far, I have tested based on Bill's post that to effect what I want to achieve, I have to use /dev/ttyconf.
I tried "stty erase ^H < /dev/ttyconf". Before, I was unable to backspace on the login prompt, now I can.
Then, Harry confirmed that kill is the option that I want to use.
However, I am hesitant to try it out until I can check what is the existing value. I am hesitant because I do not want to avoid being unable to use @ in my mailx commands.
Wodisch, unfortunately "stty -a" is not answer because it only displays the current session, not the tty default Bill was writing about.
I have confirmed this as the values of kill (and erase too) are the same for 2 machines, where one allows me to use @, the other does not.
TIA,
Shahril
ps. Harry, congrats on your achievement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2004 02:50 PM
12-20-2004 02:50 PM
Re: login prompt Qn #1
If I may resurrect this thread ....
Now, the flwg command achieves my objective:
stty kill @ < /dev/ttyconf
What I still want to know is, how do I inspect the current default settings so that I know what to revert to if I wish to undo my command.
Now, based of the previous posts:
1) stty -a show the current session-specific settings
2) stty sane, followed by stty -a gives a different output, but not exactly the default settings. How did I arrive at this conclusion?:
On a server for which the @ entry does not cancel line, stty sane followed by stty -a gave the value of kill as @:
kill = @
After issuing stty kill @ < /dev/ttyconf, the value of kill remains as @. But now the @ entry cancels the line during login entry.
Thus, there is no difference in output. So, what command should be used instead?
Rgds,
Shahril
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2004 03:20 PM
12-20-2004 03:20 PM
Re: login prompt Qn #1
> stty kill @ < /dev/ttyconf
Not a very useful setting, especially for email addresses, but OK.
> What I still want to know is, how do I inspect the current
> default settings so that I know what to revert to if I wish
> to undo my command.
stty -a
> Now, based of the previous posts:
>
> 1) stty -a show the current session-specific settings
Correct.
> 2) stty sane, followed by stty -a gives a different output,
> but not exactly the default settings.
Correct. stty sane is not useful at all. The "sane" settings are leftover from the days of Teletypes and papertape. I would not use stty sane since you need to change several settings.
> After issuing stty kill @ < /dev/ttyconf, the value of kill
> remains as @. But now the @ entry cancels the line during
> login entry.
A couple of things:
stty settings using /dev/ttyconf take place immediately for all logins *EXCEPT* for the console. The console requires a reboot.
The default settings are changed in the standard login profile (/etc/profile) so if you issue the stty/ttyconf command, /etc/profile (and possibly .profile) may have an stty command which changes the current session.
The /dev/ttyconf technique is used primarily to control login behavior (when typing the username and password). The stty settings for sessions after the login is complete are set in /etc/profile. I would use this in your /etc/profile:
/sbin/stty erase "^H" kill "^U" intr "^C" eof "^D" -parity ixoff
To answer the question about changing stty and then changing back, the man page for stty has the answer: stty -g
Use it like this:
OLD_STTY=$(stty -g)
stty
...various tasks...
stty $OLD_STTY
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2004 12:40 PM
12-28-2004 12:40 PM
Re: login prompt Qn #1
I am afraid your previous post either repeated what I learnt from your earlier posts or what I already know from other sources.
And my question remains unanswered.
I wrote:
> What I still want to know is, how do I inspect the current
> default settings so that I know what to revert to if I wish
> to undo my command.
Your answer:
stty -a
This is wrong as you have mentioned yourself, this command (on its own) is not related to "control login behaviour"
In any case, I tried your -g solution -> it does not work in reverting login behaviour.
Rgds,
Shahril
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2004 01:50 PM
12-29-2004 01:50 PM
Re: login prompt Qn #1
However, as I mentioned in the earlier posting, you can change the default settings with the /dev/ttyconf device file. So to change the setting for logins so that @ becomes the kill character (see man termio):
stty kill @ > /dev/ttyconf
This technique depends on somewhat recent patches for networking and datacomm drivers.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2004 02:16 PM
12-29-2004 02:16 PM
Re: login prompt Qn #1
the command should be:
stty kill @ < /dev/ttyconf
Rgds,
Shahril