Wątki

[ Pobierz całość w formacie PDF ]
.When a call is made to the remote system, the device entry is checked against deviceentries in the L-devices file.If multiple entries exist for a device, the first available device willbe used.The Speed field identifies the baud rate to be used when calling the remote system.A corre-sponding entry in the L-devices file for this speed must exist.The phone number is the actualnumber to call to connect with the remote system.This field contains a hyphen if it is for adirect link to a remote system.The Chat-script field is used to negotiate the login to the remote system.This entry consists ofa series of expect-send sequences.The chat script is a combination of expect-send pairs thatdefine the login sequence to gain access to the remote computer.Each pair is separated by aspace, with optional subexpect-subsend pairs separated by hyphens.Consider the followingexample:login:-BREAK-login: nuucp word: loginAokuucico expects the remote system to print login:.If you don t see one within a predefinedperiod of time, send a BREAK signal and expect login:.The BREAK signal is a modem break,which may wake up a getty running on the remote system, or cause the getty to switch speedsto something more reasonable for your system.When your system sees the login: prompt, yoursystem sends nuucp, and then waits for the word: string.When you or your system sees it, sendloginAok, which is your password.When the script successfully completes, you have logged into the system.You may not be able to log in if the system answers at a different speed from the speed atwhich your system is calling.This little glitch would prevent you from seeing the loginprompt.For example, if you are calling at 1200 baud, and the remote system answers at 2400baud, you need to send a BREAK twice, assuming that the related gettydefs entry says go from2400->300->1200.Therefore, the chat script would look like this:login:-BREAK-login:-BREAK-login: nuucp word: loginAokThe difference between the primary expect-send and the subexpect-subsend is that thesubexepect-subsend will only be used if the expect strings are not received.The uucico program stops looking at the incoming characters when a match is found for theexpect text.It is common, however, to use the last text expected to ensure that the sendsequence isn t sent to the remote system too soon.Before you can define the chat script, you need at the very least the uucp login name andpassword, which you will use to access the remote system.You should use the cu command tocontact the remote system to find out what you need to define for the script.A sample sessionappears here:chare@unilabs> cu -l tty21 Using UUCP 133Connectedlogin: nuucpWelcome to Unilabs ResearchShere=bugs~.To create a chat script for the system bugs, which is directly connected to your system, describeit this way:expect nothingsend newlineexpect login:send nuucpThis would translate into a chat script that looks like this:  \r\c login: nuucpThe pair of double quotes means  expect nothing; \r\c is  send newline. These specialcharacters are two of a number of characters used in chat scripts table 3.3 lists the others.It iswise to avoid the use of subexpect-subsend pairs unless needed, because they can often lead toproblems in establishing a connection.Testing the Connection with uucicoWhen the L-devices and L.sys files have been configured, communication can then be evalu-ated with the uucico program s debug option.The process uucico uses is essentially the samefor Version 2 and HDB.When the call is initiated, uucico keeps track of the process bycreating a status file for the machine in the /usr/spool/uucp directory.This status file is calledSTST.machine name.The status file contains the details of the last connection.If the status fileis present when the remote system calls in, the connection is dropped after telling the remotethat there is a LOCK file.If the status file is there when you want to make an outgoing call,the call is prevented, and a message is logged saying there is a status file to prevent the call.Thecontents of the status file look like this:pointer to error code|| number of calls| || | time of last call| | |4 1 729570390 LOGIN FAILED unilabs| |status |system 134 Part I: Managing Internet SecurityThe error code is explained in the status part of the entry, which eliminates the need forinterpreting the error code manually.When the status file exists, any other jobs queued for the affected system do not result in a calluntil the retry time period has been reached.To circumvent this, you can remove the statusfile.Version 2 PermissionsIn HDB UUCP, one file essentially controls access to commands and files on your system.Version 2 UUCP uses as many as five files; three files are used in the typical configuration:USERFILEL.cmdsSQFILEUSERFILEUSERFILE controls access to the files on your system for both remote and local users.It ishighly recommended that for each entry in your /etc/passwd file, you create an entry inUSERFILE.The code listing section at the end of the chapter includes genUSER, whichgenerates a default USERFILE [ Pobierz całość w formacie PDF ]

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • mikr.xlx.pl
  • Powered by MyScript