Overview - Micro Focus Community
ITG Release 5.5, April 2004
Configuring Microsoft Telnet Server for Use with the ITG Command Engine
1 Contents
Overview
Windows 2000 Server
Install the Microsoft Services for UNIX
Configure the shell startup and login scripts
Configure the MS Telnet server
Start the MS Telnet server service
Windows 2003 Server
Configure the shell startup and login scripts
Configure the MS Telnet server
Start the MS Telnet server service
2 Overview
Microsoft has of late been increasing its support for interfacing with UNIX systems. In particular, the Microsoft Telnet server has been updated and standardized in recent offerings, to the point where some Windows 2000 and Windows 2003 versions can be successfully integrated with ITG’s Command Engine.
This document describes the necessary MS Telnet server configuration required to enable remote execution from ITG. As an overview, the key point is configuring the MS Telnet server to invoke a UNIX command shell. By default, the MS Telnet server invokes a DOS command shell for execution processing. ITG’s Command Engine cannot automate DOS interactions, so some settings must be adjusted to instead invoke a UNIX “sh” shell (or “sh” derivative).
The supported UNIX shell for Windows is Cygwin BASH, a free UNIX BASH environment available from Cygwin (). This document assumes BASH is already available on the Windows server.
Supported Environments:
Windows 2000 Server (with Microsoft Services for UNIX version 3.0 or higher)
Windows 2003 Server
Windows 2000 Server
By default, a “light” version of the MS Telnet server is provided with the Windows 2000 Server OS (as well as with some version of Windows NT). ITG does not support this default version; it has a couple of significant limitations. First, it diverges from the Telnet protocol standard in some important aspects regarding how output is sent to the client, making it very difficult, if not impossible, to automate the processing of the output. (See for some additional information.) Second, the default version is meant for very basic use – it only allows 2 simultaneous telnet sessions.
But Microsoft does release a set of utilities entitled “Services for UNIX”. The Telnet server provided in version 3.0 (or higher) of the Services for UNIX (hereafter abbreviated as “SFU”) is a much better implementation that seems to have resolved the shortcomings of the previous versions.
As a result, setting up your Windows 2000 Server to use the MS Telnet server involves 4 steps:
Install SFU 3.0 (or higher)
Configure the shell startup and login scripts
Configure the MS Telnet server
Start the MS Telnet server service
Instructions to install NT Client Software for Mercury ITG
Download cygwin from (Unix utilities)
Go to the directory where the setup.exe was doneload for cygwin. Double click on setup.exe
Chose option install from local directory, click next
Update Root Directory to “c:\kintana\cygwin
Under the option for Install for chose “ALL USERS”
Leave Default test file type as unix
Click Next
Click Next
Click Next
Install should start this may take a few minutes
Unclick BOTH Options that are checked
Click OK
Open explore to the directory where cygwin is installed
Click cygwin.bat
Open a command prompt
Do an ls –l command
If the command comes back with a double prompt update the PS1 variables in C:\cygwin\etc\profile
Download sfu from (telnet service for NT)
Unzip the downloaded file
Go to the directory where SFU has been unzipped and click ‘setup.exe’
Click Next
Click Next
Click on ‘I accept the agreement’
Click on Custom Installation
Click on the following options:
Utilities
Click on Unix Perl
Click on “ENTIRE FEATURE WILL NOT BE AVAILABLE”
Interix GNU Components
Click on “ENTIRE FEATURE WILL NOT BE AVAILABLE”
NFS
Click on Server for NFS
Click on “ENTIRE FEATURE WILL NOT BE AVAILABLE”
Password Synchronization
Click on “ENTIRE FEATURE WILL NOT BE AVAILABLE”
Authentication tools for NFS
Click on “ENTIRE FEATURE WILL NOT BE AVAILABLE”
Interix SDK
Click on “ENTIRE FEATURE WILL NOT BE AVAILABLE”
ActiveState Perl
Click on “ENTIRE FEATURE WILL NOT BE AVAILABLE”
Only the following should get downloaded others might have to be installed as needed
Utilities => Base Utilities
NFS => client for NFS
Remote Connectivity
Windows Remote Shell Services
Click Next after verification
Click on Change the default behavior to case sensitive
Click Next
Update Windows domain name with the local machine name
Click Next
Change the directory to C:\Kintana\SFU for the install
1 Install the Microsoft Services for UNIX
Important Note: ITG is certified only for version 3.0 or higher of the SFU.
Insert the install disk and start the installation. A standard install wizard will open:
[pic]
Click the Next button. In the next page, choose to “Add or remove” components:
[pic]
Click the Next button. The next page displays the available components. You only need the Telnet Server component, which is in the Remote Connectivity folder. Make sure this is enabled (should not show the X icon). All other components can be “deselected” by clicking the DOWN arrow icon and choosing the X option:
[pic]
Note that the SFU also includes its own set of UNIX components, the “Interix GNU Components”. Interix is a POSIX environment that, in the future, might be integrated with ITG to obviate the need for Cygwin BASH. Currently, however, the ITG Command Engine does not support the Interix shells, so BASH is still a necessity.
Click the Next button through the next wizard screens until the installation commences. When complete, you may be asked to restart the server. Other than that, the MS Telnet server is installed and ready to be configured. Note that this new Telnet server is installed over the default Telnet server that was provided with the Windows 2000 OS.
2 Configure the shell startup and login scripts
For the MS Telnet server to successfully invoke the BASH shell as the command shell, two scripts must be created:
Shell startup script, “cygnus.bat”
Login script, “login.cmd”
Configure the shell startup script (“cygnus.bat”)
Choose a location for the startup script. Convention dictates that this script be located in the Cygwin root directory. In this example, assume the Cygwin root directory is located at
C:\Program Files\cygwin\.
You will also need the path to the Cygwin \bin\ directory. In this example, assume the Cygwin \bin\ directory is located at
C:\Program Files\cygwin\H-i586-cygwin32\bin\.
In the Cygwin root directory, create a batch file named “cygnus.bat”, with the following contents:
@ECHO OFF
SET MAKE_MODE=UNIX
SET PATH=C:\PROGRA~1\cygwin\H-I586~1\bin;%PATH%
echo thank you bill >nul
bash -login -noediting -noprofile -i
*Note: It still seems important to specify the PATH in this script, even if the system environment path already includes the Cygwin \bin\ directory.
*Note: The line “echo thank you bill >nul” is a trick to get around a bug that prohibited the shell from starting. For more information, visit .
*Note: It is a good idea to type the above text manually into the “cygnus.bat” file using a standard ASCII text editor like Notepad or VI, rather than cutting and pasting. Some MS Word non-ASCII characters are not recognized by the command shell, and can lead to mysterious errors!
Configure the login script (“login.cmd”)
A login “cmd” script is required during Telnet session initiation. This can be as simple as a single-line “echo” statement, or it can perform additional functionality upon session startup if desired.
In the Cygwin root directory, create a cmd file named “login.cmd”, with the following contents (replace the echo string with any desired message):
echo 'welcome to '
3 Configure the MS Telnet server
Configuring the MS Telnet server requires two steps:
Edit the Telnet server registry entry to specify the shell startup and login scripts.
Run the SFU administration utility to configure the Telnet server settings.
Edit the MS Telnet server registry
Unfortunately, no interface was provided for specifying the shell startup script, so this must be done directly in the windows registry. This is a simple operation – only two parameters need to be updated.
Go to Start ⋄ Run, enter “regedt32”, and click OK.
[pic]
When the registry window opens, go to HKEY_LOCAL_MACHINE ⋄ SOFTWARE ⋄ Microsoft ⋄ TelnetServer ⋄ 1.0. When you highlight the “1.0” folder, the parameter list will be displayed in the right-hand panel of the registry window:
[pic]
*Note: You’ll see a separate registry entry for “TelnetServerWin2K”. This is the registry for the default Telnet server that came with the Windows 2000 OS. When you installed the SFU Telnet server, it overwrote this default Telnet server, but apparently its registry entries do not get cleaned up. Just leave this “as is”; it doesn’t impact the usage of the Telnet server installed from SFU.
Double-click on the “LoginScript” entry. Enter the full path to the login script you created above, and then click OK to apply the change. In this example, it is
C:\PROGRA~1\cygwin\login.cmd
Double-click on the “Shell” entry. Enter the full path to the shell startup script you created above, and then click OK to apply the change. In this example, it is
C:\PROGRA~1\cygwin\cygnus.bat
*Note: Do not change the value of the “DefaultShell” entry. This seems to have an adverse effect on the proper functioning of the MS Telnet server.
Run the SFU administration utility
The Services for UNIX toolset does provide an interface for administering properties of the Telnet server such as the authentication mode, port number, number of simultaneous sessions allowed, etc. The authentication mode must be configured to use “Plaintext” authentication, not NTLM authentication, to allow the ITG Command Engine to login successfully with a username and password. The port must be set to the default value “23” for successful connectivity from ITG.
Go to Start ⋄Programs ⋄ Windows Services for UNIX ⋄ Services for UNIX Administration menu item. This will bring up the administration UI. Select the “Telnet Server” item in the “Services for UNIX [ local ]” folder. The Telnet server settings will be displayed in the right-hand panel:
[pic]
Choose the Plaintext Authentication checkbox. Switch to the Server Settings tab and set additional settings as desired:
[pic]
*Note: The mode of operation can be set to either of the two available options, “Console” or “Stream”, without impact to the ITG Command Engine. If you will also be supporting manual Telnet sessions, then the “Console” setting provides additional output formatting to facilitate a human user setting, and is thus recommended.
*Note: The ITG Command Engine requires the use of port 23, the default Telnet port. Make sure that the Telnet port is set to 23.
4 Start the MS Telnet server service
Starting and stopping the MS Telnet server is done in the same manner as starting and stopping any other Windows Service. Just go to the Services control panel (Start ⋄ Control Panel ⋄ Administrative Tools ⋄ Services menu). To start the service, highlight the row containing “Telnet Server”, and click the Start button. To stop the service, highlight the same row and click the Stop button.
Windows 2003 Server
The standard configuration of Windows 2003 Server includes an updated version of the MS Telnet server that works well with the ITG Command Engine. As a result, it is not necessary to separately install the Services for UNIX utilities.
Setting up your Windows 2003 Server to use the MS Telnet server involves 3 steps:
Configure the shell startup and login scripts
Configure the MS Telnet server
Start the MS Telnet server service
1 Configure the MS Telnet server
Configuring the MS Telnet server requires two steps:
Edit the Telnet server registry entry to specify the shell startup.
Run the SFU administration utility to configure the Telnet server settings.
Edit the MS Telnet server registry
Unfortunately, no interface was provided for specifying the shell startup script, so this must be done directly in the windows registry. This is a simple operation – only two parameters need to be updated.
Go to Start ⋄ Run, enter “regedt32”, and click OK.
[pic]
When the registry window opens, go to HKEY_LOCAL_MACHINE ⋄ SOFTWARE ⋄ Microsoft ⋄ TelnetServer ⋄ 1.0. When you highlight the “1.0” folder, the parameter list will be displayed in the right-hand panel of the registry window:
[pic]
Double-click on the “DefaultShell” entry. Enter the full path to the bash.exe file and then click OK to apply the change. In this example, it is
C:\cygwin\bin\bash.exe
Double-click on the “Shell” entry and clear the existing value.
Double-click on the “SwitchToKeepShellRunning” entry and clear the existing value.
Double-click on the “LoginScript” entry and change to value to
-login -noediting -noprofile -i
Run the Telnet administration utility
A command-line utility called “tlntadmn” is provided for administering properties of the Telnet server such as the authentication mode, port number, number of simultaneous sessions allowed, etc. The authentication mode must be configured to use “Password” authentication, not NTLM authentication, to allow the ITG Command Engine to login successfully with a username and password. The port must be set to the default value “23” for successful connectivity from ITG.
In a DOS command shell, you can view the current Telnet server settings by simply running “tlntadmn” with no arguments. The help screen can be displayed by typing “tlntadmn /?” at the command line:
[pic]
To configure the Telnet server for “Password” authentication, use
tlntadmn config sec=-NTLM+passwd
To configure the Telnet server for “console” mode, use
tlntadmn config mode=console
[pic]
*Note: The mode of operation can be set to either of the two available options, “Console” or “Stream”, without impact to the ITG Command Engine. If you will also be supporting manual Telnet sessions, then the “Console” setting provides additional output formatting to facilitate a human user setting, and is thus recommended.
*Note: The ITG Command Engine requires the use of port 23, the default Telnet port. Make sure that the Telnet port is set to 23.
3. To Change the PATH settings if all the unix commands are not working
Go to Control Panel ⋄ systems ⋄ Advanced ⋄ Environment Variables ⋄ System Varibles ⋄ Path
Add the entry ;C:\\usr\bin where is the path where Cygwin is installed.
2 Start the MS Telnet server service
Starting and stopping the MS Telnet server is done in the same manner as starting and stopping any other Windows Service. Just go to the Services control panel (Start ⋄ Control Panel ⋄ Administrative Tools ⋄ Services menu). To start the service, highlight the row containing “Telnet Server”, and click the Start button. To stop the service, highlight the same row and click the Stop button.
Revision History
|Modification |Author/Editor |Date |
|Created: |Andrew Zenk |4/19/04 |
|UPDATED |Giac Vu |9/24/04 |
|UPDATED |Manoharan V155948 |5/24/06 |
|Last Saved: | | |
3
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.