Change backspace/erase character before login

harryh813

New Member
Joined
Oct 6, 2025
Messages
2
Reaction score
0
Credits
26
We recently transitioned from AIX to RHEL. We have thousands of users running a terminal emulation program called BluVista and all of those are set to use x08 as the backspace key. We change the backspace to x08 in the users profiles but this will only work after the user logs in so when you're at the login/password prompt in RHEL the backspace does not work, it just displays ^H^H^H. I'm looking for a way to change the backspace key, before login, so that x08 works as backspace at the login/password prompt.

All of the users connect using telnet. I tried to alter the [email protected] to call a shell wrapper that would set the backspace, using stty, then call /bin/login but I couldn't get that to work.

Can anyone assist with getting the backspace key changed to x08 before login?

Operating System: https://www.redhat.com/Red Hat Enterprise Linux 9.4 (Plow) CPE OS Name: cpe:/o:redhat:enterprise_linux:9::baseos Kernel: Linux 5.14.0-427.77.1.el9_4.x86_64 Architecture: x86-64 Hardware Vendor: Microsoft Corporation Hardware Model: Virtual Machine Firmware Version: Hyper-V UEFI Release v4.1

I've tried using [email protected] to call a wrapper in order to set the backspace key "stty erase '^H'" and then call the /bin/login but I can't get it to work.
 


Hmm... I know most of the people on this site, which strengths and whatnot. We may not have anyone to help with this, but we could have and I just don't know it.

The point of this comment is to mention that you're paying for RHEL and that their support is generally pretty good. If you don't get an answer here, you might want to try the support from Red Hat.

Also, I'm a bit surprised to see telnet in this day and age.
 
Thank you for your response. I'll get with the admins and see if they can post the question to RH.
 
Use /etc/issue.net to Set Terminal Modes
This file is shown to network users before login. While it doesn't directly set terminal modes, you can use it to trigger a script or wrapper if your Telnet daemon supports it.

However, Telnet does not support pre-login hooks for setting terminal modes like stty. So this is limited.



Modify Telnet Daemon Behavior
If you're using telnetd from inetd or xinetd, you might try wrapping the login shell in the Telnet service config:

Code:
```ini
service telnet
{
    ...
    server = /usr/local/bin/login-wrapper
    ...
}
```

Then in /usr/local/bin/login-wrapper:

Code:
```bash
#!/bin/bash
stty erase '^H'
exec /bin/login
```

But this often fails because stty needs a controlling terminal, which may not be available at that point.


You could consider:
  • Customizing the Telnet daemon source code to set stty erase '^H' on the pseudo-terminal before invoking /bin/login.
  • Using a different Telnet daemon that allows pre-login terminal configuration.

This is more complex but may be the only way to truly fix the issue at the daemon level.


Force Terminal Emulator to Send ASCII 127
If possible, configure BluVista to send ^? (ASCII 127) instead of ^H. This aligns with Linux defaults and avoids needing to change system behavior.



Given the limitations of Telnet and stty, the most reliable solution is to reconfigure BluVista to send ASCII 127 for backspace. If that's not feasible, then patching the Telnet daemon to set terminal modes before login is the next best option.
 
We recently transitioned from AIX to RHEL. We have thousands of users running a terminal emulation program called BluVista and all of those are set to use x08 as the backspace key. We change the backspace to x08 in the users profiles but this will only work after the user logs in so when you're at the login/password prompt in RHEL the backspace does not work, it just displays ^H^H^H. I'm looking for a way to change the backspace key, before login, so that x08 works as backspace at the login/password prompt.

All of the users connect using telnet. I tried to alter the [email protected] to call a shell wrapper that would set the backspace, using stty, then call /bin/login but I couldn't get that to work.

Can anyone assist with getting the backspace key changed to x08 before login?

Operating System: https://www.redhat.com/Red Hat Enterprise Linux 9.4 (Plow) CPE OS Name: cpe:/o:redhat:enterprise_linux:9::baseos Kernel: Linux 5.14.0-427.77.1.el9_4.x86_64 Architecture: x86-64 Hardware Vendor: Microsoft Corporation Hardware Model: Virtual Machine Firmware Version: Hyper-V UEFI Release v4.1

I've tried using [email protected] to call a wrapper in order to set the backspace key "stty erase '^H'" and then call the /bin/login but I can't get it to work.
Unfamiliar with the BluVista terminal emulator, and a quick search couldn't find it in a number of linux repos.

I'm unsure whether the following applies in the described situation, but in linux, one possibility for changing key definitions is to alter the terminfo entries for a terminal on the system.

Basically one dumps the current terminfo entry with a command like: infocmp > termDump.info
Then one would edit the file and recompile it with a command like: tic termDumpAmended.info
Filenames are arbitrary.
 


Follow Linux.org

Staff online


Top