• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 297
  • Last Modified:

How disable Ctrl+C to shell from telnet

I wrote a Visual Fox Pro application to automate the expiration of Solaris passwords
from Win95 clients. Our users don't know unix, so I call the telnet executable with a
servername, and control the process from shell commands in the user's ".profile".
However, one security weakness, is that users can press "Ctrl+C" and get to the shell
prompt once they get pass the initial login prompt of telnet even though the script
controls all shell commands called.
How can I disable the Ctrl+C from within the script?

Thanks in advance for your help!

Denmark W.
1 Solution
assuming sh, ksh syntax:

function aborted { echo "Interrupt disabled." }
trap aborted 2 15

or how about setting the script to be your login shell?
denmarkwAuthor Commented:
Thanks! BTW the correct systax is:
aborted () { echo "Interupt disabled"
trap aborted 2 15
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now