-->
Previous Table of Contents Next


Login Scripts

The login scripts that form part of the /usr/lib/uucp/sys or /usr/lib/uucp/Systems file can be the most difficult part of a UUCP connection to set correctly. If the machine you are logging in to is a typical UNIX system, there should be only the usual login and password prompts to worry about. Other systems may require some special handling to gain access. For this reason, the login script is worth a quick look.

Generally, the layout of the login script is in a pattern-action pair, with the pattern coming from the remote machine and the action from the local. A simple login is as follows:


login: merlin password: secret1

In this case, the local system waits until it sees the string login: coming from the remote, sends merlin, waits for password:, then sends secret1. You can simplify the script a little by cutting out extra letters from the remote, because all you really need are the last couple of characters and the colon. The script could be written like this:


gin: merlin word: secret1

This type of script has a good use. Suppose the remote system sends Login: instead of login:; then the shortened form will work and the longer match won’t.

One useful feature of the uucico login script is the ability to wait for the remote machine to reset itself (or start a getty process, more likely). This is implemented by using a hyphen and the word BREAK in the script which tells uucico to send a break sequence if the remote site hasn’t responded in a timely manner. For example, the script would be similar to this:


ogin:-BREAK-ogin: merlin sword: secret1

In this case, if the remote machine doesn’t respond with a login: prompt after a short period of time, the local machine sends a break sequence and waits for the prompt again.

A few special characters can be used in the login script. The most important ones for most UUCP purposes are the following:

\c Suppresses sending carriage return (send only)
\d Delays one second (send only)
\p Pauses for a fraction of a second (send only)
\t Sends a tab (send and receive)
\r Sends a carriage return (send and receive)
\s Sends a space (send and receive)
\n Sends a newline (send and receive)
\\ Sends a backslash (send and receive)

Sometimes you need to use one or more of the characters to get the remote machine to respond to a modem login. For example, the following script sends a carriage return-line feed pair before starting to match characters:


\n\r\p ogin: merlin word: secret1

This is usually enough to get the remote machine to start a getty on the port.

Changing Access Times

Both Taylor and HDB UUCP versions let you specify a time to call the remote systems. Although the examples so far show Any (meaning the system can be called at any time, day or night), you may want to restrict calls to local-cost times or to certain days of the week. The reason for limiting calls may be at your end (costs, for example) or at the remote (limited access times during the day, for example).

To specify particular days of the week to allow calls, use a two-digit abbreviation of the day (Mo, Tu, We, Th, Fr, Sa, Su), Wk for weekdays (Monday through Friday), Any (for any time), or Never (for not allowed to connect). Any combination of the days may be used, as you will see in a moment. The times for connecting are specified as a range, in 24-hour format, when a time span is required. If no time is given, it is assumed that any time during the day is allowed.

Dates and times are run together without spaces, while subsequent entries are separated by commas. Examples of restricted access times are as follows:


Wk1800-0730



MoWeFr



Wk2300-2400, SaSu

The first example allows connection only on weekdays between 6 p.m. and 7:30 a.m. The second allows connection any time on Monday, Wednesday, or Friday. The last example allows connections only between 11 p.m. and midnight on weekdays and any time on weekends. You can build up any time and date specifications you want. These apply to both Taylor and HDB UUCP versions.


Previous Table of Contents Next