| Bookmark Name | Actions |
|---|
Windows Telnet
Telnet is an application protocol used on the Internet or local area network to provide a bidirectional interactive text-oriented communication facility using a virtual terminal connection. jBASE is supplied with a Windows telnet server to enable you to telnet into a windows server.
After connecting to the telnetd service by using your password, you will be logged into the NT system in a simple execution mode of a normal DOS command shell. You may however change the startup program from cmd.exe to any jBASE program including the jsh.exe (jSHELL).
Account Naming Issues
Windows NT account names can exist in several name spaces. For example, a Windows NT station in an Advanced Server domain has a local Administrator account and also has a corresponding Administrator account in its default domain. jBASE TCP Remote Logon Services use the following rules to disambiguate account names:
- If the account name is qualified (contains a backslash), the name preceding the backslash is first treated as a domain name, if there is no corresponding domain, then it is treated as a machine name. (Example: MainDomain\Administrator).
- If the account name is not qualified (does not contain a backslash), then the name is first searched on the local machine. If the account name is not found, then it is searched in the default domain of the machine.
User Environment
When you log in, the environment will contain all system-wide environment variables that are set on the local system. They will not receive their normal user environment settings at this moment in time (the Win32 API does not provide this ability). To circumvent this omission in the Win32 API, the jBASE TCP Remote Logon Services automatically set the following environment variables:
| Environment Variable | Description |
|---|---|
|
USERDOMAIN |
The domain name in which the user account is defined. |
|
USERNAME |
The account name of the user. |
|
HOMEPATH |
The path name of the home directory of the user. If the user’s home directory is a remote path, then this will contain the Universal Naming Convention (UNC) name of the user’s home directory. |
|
HOMESHARE |
Always set to NULL. |
|
HOMEDRIVE |
If the user’s home directory is local, then this will contain the drive letter followed by a colon. If the home directory is remote, then this is set to NULL. |
|
JBC_TELNET_FLAG |
This is set so that a user process can determine if it is being run via telnet session or via the console. |
Since the remote user shares the drive map with all other users, it is not possible to automatically mount a remote user’s remotely named directory on its normal drive letter. However, many sites may wish to establish conventions whereby remote users are allowed to use certain drive letters remotely. Further, other environment variables may need to be set at logon. Thus, the jBASE TCP Remote Logon Services execute the remote.cmd file if present in the user’s home directory. If a remote user’s home directory is specified as a remote directory, then the user’s initial directory will be C:\. If desired, then this can be overridden in remote.cmd.
By default if the user has a remote.cmd file, then it is read by the telnet process and parsed. The first command it finds will be executed. This file is intended mainly to allow the user to set up the environment, and so this parsing is primitive. For example, only the first command it finds is executed, so a remote.cmd created by the jBASE iju for instance will be the jsh. To disable this feature and have the NT command proceessor read the file, the registry setting ParseProfile should be set to 0. You should therefore avoid using command such as cd and call.
Customisation
You can edit the registry by using Registry Editor (Regedit.exe or Regedt32.exe). If you use Registry Editor incorrectly, you can cause serious problems that may require you to reinstall your operating system. jBASE does not guarantee that problems that you cause by using Registry Editor incorrectly can be resolved. Use Registry Editor at your own risk.
If you change or create any of the registry entries below, then you will need to stop and restart the services with the new or changed values before those entries takes effect.
Create a registry entry of type REG_SZ with the name Banner under registry key:
HKEY_LOCAL_MACHINE\Software\JAC\jBASE Telnetd Server\CurrentVersion
In the Value data: string, the sequence \n generates an end of line output, to use the \ characters. In the banner string, use two \ characters in a row. For example,
Name Type Data Banner REG_SZ Welcome to jBASE\nThe Multi-value database of the future\n
Create a registry entry of type REG_SZ with the name PreBanner under registry key:
HKEY_LOCAL_MACHINE\Software\JAC\jBASE Telnetd Server\CurrentVersion
In the Value data: string, the sequence \n generates an end of line output, to use the \ characters. In the banner string, use two \ characters in a row. For example,
Name Type Data PreBanner REG_SZ jBASE telnet process\nPlease log into system\n
Create a registry entry of type REG_SZ with the name LogonPrompt under registry key:
HKEY_LOCAL_MACHINE\Software\JAC\jBASE Telnetd Server\CurrentVersion
For example,
Name Type Data LogonPrompt REG_SZ Windows User Name:
If this registry value is not present, then the default logon prompt is Account Name:.
Create a registry entry of type REG_SZ with the name PasswordPrompt under registry key:
HKEY_LOCAL_MACHINE\Software\JAC\jBASE Telnetd Server\CurrentVersion
For example,
Name Type Data PasswordPrompt REG_SZ Windows Password:
If this registry value is not present, then the default password prompt is Password:.
Create a registry entry of type REG_SZ with the name FailedLogonMessage under registry key:
HKEY_LOCAL_MACHINE\Software\JAC\jBASE Telnetd Server\CurrentVersion
In the Value data: string, the sequence \n generates an end of line output, to use the \ characters. In the banner string, use two \ characters in a row. For example,
Name Type Data FailedLogonMessage REG_SZ \nFailed logon...Valid "WINDOWS" USER/PASSWORD?\n
If this registry value is not present, then the default message is Logon failed: unknown user name, password or privilege incorrect.
Create a registry entry of type REG_DWORD with the name LogEventLogon under registry key:
HKEY_LOCAL_MACHINE\Software\JAC\jBASE Telnetd Server\CurrentVersion
If this registry entry is present and set to 0, then normal logon and logoff events will not be logged into the registry. If this entry is either not present, or it is set to 1, then an entry will be written into the registry whenever a user logs on or off the system.
Create a registry entry of type REG_SZ with the name CommandProcessor under registry key:
HKEY_LOCAL_MACHINE\Software\JAC\jBASE Telnetd Server\CurrentVersion
For example,
Name Type Data CommandProcessor REG_SZ C:\JBASE30\BIN\JSH.EXE -
This will cause the jSHELL to start and execute the login PROC in your MD if you have one. By default, all services invoke cmd.exe as the command processor. By adding the registry value, you can override the command processor used by all users.
Create a registry entry of type REG_DWORD with the name IncreaseLogonPriority under registry key:
HKEY_LOCAL_MACHINE\Software\JAC\jBASE Telnetd Server\CurrentVersion
On loaded systems, the logon process can be slow. You can set this registry value to 1 if you want to increase the priority of the logon, at the expense of other processes on the system.
Create a registry entry of type REG_DWORD with the name ExitDetectionTimeout under registry key:
HKEY_LOCAL_MACHINE\Software\JAC\jBASE Telnetd Server\CurrentVersion
For example,
Name Type Data ExitDetectionTimeout REG_DWORD 0x000001f4 (500)
Due to a technical issue related to pipes, the telnetd server has to guess when a command prompt is about to exit. In this situation, the telnetd server waits before doing a read of input. If this read timeout is too short, then the exit detection doesn’t work, and users need to type an extra input before the telnetd exit (in other words, when the user types exit to cmd.exe, the telnet client will not hang up until the user types an extra character).
If this registry value is not present, then the default value is 400 milliseconds 0x00000190 (400).
Create a registry entry of type REG_DWORD with the name LogonAttempts under registry key:
HKEY_LOCAL_MACHINE\Software\JAC\jBASE Telnetd Server\CurrentVersion
For example,
Name Type Data LogonAttempts REG_DWORD 0x00000005 (5)
If this registry value is not present, then the default value is 3 attempts 0x00000003 (3).
Create a registry entry of type REG_DWORD with the name ParseProfile under registry key:
HKEY_LOCAL_MACHINE\Software\JAC\jBASE Telnetd Server\CurrentVersion
For example,
Name Type Data ParseProfile REG_DWORD 0x00000000 (0)
By default, the telnet service reads any remote.cmd file that it finds in a user’s home directory, and execute the first command it finds. This is efficient and avoids having a command processor for each port; however, the commands that are supported are restricted to setting environment variables (set) and echoing text (echo). If you want the NT command processor to parse the file, then set the value to 0.
The telnet port used by jtelnetd is stored in the %windir%\system32\etc\services item. jBASE uses the port specified by jtelnet (if present) or telnet if no jtelnet is present. To change the port for jBASE telnet, you can add the following entry, which allows another telnet client to run on the port defined by telnet:
jtelnet 2323/tcp (This would start jBASE telnet process on port 2323)
Or change telnet itself if jBASE telnet is the only telnet process to be run.
telnet 2323/tcp (This would start jBASE telnet process on port 2323)
The format of the services file is similar to:
# Copyright (c) 1993-1999 Microsoft Corp. # # This file contains port numbers for well-known services defined by IANA # # Format: # # <service name> <port number>/<protocol> [aliases...] [#<comment>] # echo 7/tcp echo 7/udp ... telnet 23/tcp
Troubleshooting
This section provides the technical support when you work with Windows Telnet.
The jBASE TCP Remote Logon Services report error messages to the Application Event Log. This log can be viewed using the Event Viewer application, which can usually be launched by double clicking its icon in the Program Manager group > Administrative Tools. Make sure the Application event log is selected (its entry in the Log menu should have a check mark beside it... if not, select it).
All jBASE TCP Remote Logon Services entries begin with the jBASE tag. Most of the error messages are self-explanatory. Any error codes mentioned are standard Windows NT error codes as returned by GetLastError().
On few occasions, you may have a service failure. These are logged by the Service Control Manager in the System Log.
Eventlog says: jBASE Command Starter: CreateProcess: 5
This means that an account with admintrator privileges tried to logon, but that account does not have sufficient rights to execute transcmd.exe. The error cannot be caught sooner as Administrator accounts have a large number of privileges that allow all other operations up to this point to succeed.
Service Manager can’t find .exe or Start failed: 2
This error means that you have moved the software after you installed it. Services cannot be moved after installation, as an absolute path name is stored. To correct the problem, remove, and then reinstall the software.
Access denied when accessing a drive mounted with NET USE
Since Windows NT was not initially designed with the idea of more than one interactive user logged on at the same time, oddities often occur when accessing remote drives via a drive letter in the shared drive map. Most users seem to have better results when accessing remote drives via the SUBST command. Accessing remote drives via UNC names also works and is recommended.
Login failure messages in the Event Log every minute
This is due to a bug in Compaq’s Insight Manager Program. Compaq has provided a work-around upgrade to version 2.60b or newer of the Insight Manager product. Use the control panel for the Insight Manager product to disable telnet detection.
Program exits immediately with no output
The most likely problem is that the required DLL is missing from your PATH. Since, telnetd users need to see the error messages in a non-GUI form, setting are done so that Windows NT will not let an error pop-up box occur for this error, but rather cause the error code to be returned to the calling program. In most instances, this setting has the desired effect of letting a remote error see the error message; however, Microsoft has made cmd.exe suppress the error message for a missing DLL.
Add Bookmark
save your best linksView Bookmarks
Visit your best linksIn this topic
Are you sure you want to log-off?