We need to su to root in 1000 systems, so it is almost impossible to add "stty erase ^H" to every .profile on these systems.
Is there any way to set delete key to erase automatically after running "su -"?
Thanks
We need to su to root in 1000 systems, so it is almost impossible to add "stty erase ^H" to every .profile on these systems.
Is there any way to set delete key to erase automatically after running "su -"?
Thanks
try adding it to shells .profile not in users .profile
Why is it impossible? That's what scripts are for.
If you put it in /etc/profile, you only need to do it once per system.
Ok. It is possible, then we will have to put "stty erase ^H" in /etc/profile for 1000 systems.
Is there a better way to achive the goal? Thanks!
May be operating system dependent (see "man su").
On my system these both work because the command executes after the target system's profile:
su - root -c "stty erase '^H'"
su root -c "stty erase '^H'"