How to disable CTRL-Z in Windows Telnet Server

Posted on 2011-04-21
Last Modified: 2012-05-11
We run a home-made commande line applications that is executed when someone logs on our telnet server on Windows Server 2003 (we call this .EXE from the login.cmd file).

The user logs with his NT account (he is part of the Telnet Clients Groups). When it logs, our application launches. The user can disconnect by choosing an option in our application. This close the .EXE and the connection. But if the user does CTRL-Z, it ask to terminate the batch job. The user then say Yes and then he has access to the server.

How do we disable CTRL-Z ?
Question by:Lanticrogers
    LVL 5

    Accepted Solution

    You cannot directly modify the behavior of the batch job/cmd prompt.

    I have a similar environment where a user can create batch jobs however I have disabled access to the cmd prompt through group policy. During a quick test a moment ago I created a batch [dir c:\ /s] and saved to desktop. As it ran I pressed CTRL+C [not Z] and chose YES to cancel batch job. It immediately stated I do not have access and terminated the access to cmd.exe

    You can modify this via group policy:
    User Configuration - System - Prevent Access to the command prompt.

    You should test this change in a dev environment first and/or change the ACL of the GPO to apply to certain users.

    I have many offshore developers and have locked down the Terminal Servers extremely well, and always try defeating my own changes and have it now where security is balanced for their job function. Hopefully this can lead you in a better direction for securing your system.


    Author Closing Comment

    Thanks I will give it a try

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Scenerio: You have a server running Server 2003 and have applied a retail pack of Terminal Server Licenses.  You want to change servers or your server has crashed and you need to reapply the Terminal Server Licenses. When you enter the 16-digit lic…
    Introduction: Sometimes when I receive a call from my users to solve their problems it is very difficult for me to found their computer IP address. Even finding their computer Host to provide remote support can be a problem.  So I resorted to Goo…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now