Administering the Systems file

Login chat scripts

A login chat script opens communications between computers, by recognizing and sending proper login and password sequences. You can add a login chat script using the Dialup Systems Manager.

The script is a series of space-separated fields of the following format:

expect send

expect is the string that is received, and send is the string that is sent in response to the expect string.

The expect field can consist of subfields of the following form:


subsend is sent if the prior expect is not successfully read, and the subexpect following the subsend is the next expected string. In other words, the expect-send sequence sends a string if the expect string is received; the subsend-subexpect sends only if the prior expect string is not received within 10 seconds.

For example, with ``login:--login:'', the UUCP program expects ``login:''. If it receives ``login:'' then it proceeds with the next field. If it does not get ``login:'', it sends a carriage return, then looks for ``login:'' again. If no characters are initially expected from the remote computer, the null string should be used in the first expect field. Note that all send fields are sent followed by a carriage return unless the send string is terminated with a ``\c''.

If an expect string starts with a dash, it is interpreted as a null expect string followed by a subsend string. For example, ``--login:'' sends a carriage return and then expects ``login:''.

The expect string need not be complete; only the trailing characters must be specified, such as ``ogin:''. This avoids difficulties with strings that use an uppercase letter such as ``Login:'' or ``Password:''.

For normal UUCP use, the strings should be:

expect string send string
ogin: uucp
assword: uucp_passwd

uucp_passwd is the uucp password that you obtain from the remote system administrator.

Login scripts often require some experimentation. There are cases that require one or more BREAK sequences before presenting a login (this is often the case with variable speed modems). If you cannot obtain the necessary login sequence from the system administrator for a given site, it is a good idea to connect with the site manually. You can accomplish this using cu(1bnu) to find out what must be sent to generate a login prompt. You can also connect to a system using Uutry(1Mbnu) for debugging; see ``Testing a connection with Uutry or cu'' for details of how to do this with the Dialup Systems Manager.

There are several escape characters that cause specific actions when sent during the login sequence, some of which correspond to keystrokes. These should be included in the script where necessary. See Systems(4bnu) for a list of the escape sequences.

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 22 April 2004