[ Pobierz całość w formacie PDF ]
.4.Table 3.4Chat Script Special CharactersSequence Meaning Expect null stringEOT Send an End Of Transmission characterBREAK Send a BREAK signal (may not be implemented on all systems)@ Same as BREAK\b Send a backspace\c Suppress newline at the end of the string\d Delay for one second\E Start echo checking.(From now on, whenever a character is transmit-ted, it will wait for the character to be received before doing anythingelse.) Not implemented on all systems\e Turn echo check off\K Same as BREAK (BNU only)\n Send newline or linefeed characterUsing UUCP 113Sequence Meaning\N Send a NULL character (BNU only)\0 Send a NULL character\p Pause for a fraction of a second (BNU only)\r Send a carriage return\s Send a space character\t Send a tab character\\ Send a \ character\nnn Translate the octal digits nnn into a single ASCII character and sendsthat characterThe chat script used in the preceding example is very simple.Chat scripts get much morecomplicated depending on the intended connection.The following sample chat scripts rangefrom the simple to the complex:in:--in: nuucp word: panzerExpect in: if not received, send a NULL string (newline)send nuucpexpect wordsend panzer @ ogin:-@-ogin:-BREAK-ogin:-BREAK-ogin: uucp word: froginexpect nothingsend @ (equivalent to BREAK)expent ogin: if not received, send BREAK, maximum of two timessend uucpexpect word:send frogin \r\d\r\d ogin:-BREAK-ogin:-BREAK-ogin: anonexpect nothingsend newlinedelaysend newlinedelayexpect ogin: if not received, send BREAK, maximum of two times send anon \r\d service: uucp ogin: mimi word: guesswhoexpect nothingsend newlinedelayexpect servicesend uucp114 Part I: Managing Internet Securityexpect ogin:send mimiexpect wordsend guesswhoWarningWhen you use UUCP over TCP/IP, do not include BREAKs or other subexpect-subsend combinations.They are not needed and can often lead to problems inestablishing a connection.Now that you know how the System file is formatted, here are some additional examples.(Notice that these examples also include UUCP over TCP/IP.This configuration is describedlater in this chapter.)sosco Any,15 TBIT 9600 14084291786 \r\d\r\d ogin:-BREAK-ogin:-BREAK-ogin: uuslsunilabs.org Any TBIT 1200 5551211 \r\d\r\d ogin: nuucp word: nothinguunet.ca Any TBIT 19200 5551210U \r\d service: uucp ogin: mimi word: noneuunet.ca Any TCP,e Any - ogin: mimi word: nonesffoo Any STARLAN - sffoo in: in: nuucp word: nuucpTesting the Connection Using uucicoNow that the Systems file is set up, it is important to verify that your configuration to thispoint is correct.The uucico command is used with the -x option to specify a debug level, orwith the uutry (Uutry on some systems) command.The most difficult part of working with uucico is interpreting its error messages.Sometimestheir messages are Greek to even the most experienced system administrator.To test theconnection and the uucico process, you can use the -x# option with uucico.This option printsdebug information on-screen.The # is a debug level, ranging from 1 to 9, with 9 being themaximum amount of debugging information available.From implementation to implementa-tion, the amount of information provided at various levels depends on how the programmerscoded it when they modified UUCP for their vendor.The following debug output illustrates aterminal session:chare@unilabs> /usr/lib/uucp/uucico -r1 -x9 -sbugsconn(bugs)Device Type bugs wantedgetto ret -1Call Failed: DEVICE LOCKEDConversation Complete: Status FAILEDThe debug output displayed is created by using the option -x followed by a level number.Thehigher the number, the higher the level of debug information that is printed.As mentionedearlier, the highest value is 9.In the following example, the connection to the remote systemnamed bugs failed because the device is locked, meaning someone else is using the device.Theonly recourse you have is to wait until the device is free.Another attempt at establishingcommunications with the remote system is shown in the following:Using UUCP 115chare@unilabs> /usr/lib/uucp/uucico -r1 -x9 -sthumperconn(thumper)Device Type thumper wantedgetto ret -1Call Failed: CAN T ACCESS DEVICEConversation Complete: Status FAILEDNote that the preceding example displayed a different error message: CAN T ACCESS DEVICE.To correct this problem, suspect that the owner and group owner for the associated device fileis incorrect.For example, if the connection attempts to use /dev/tty16 when connecting, checkthe ownership using the ls -l command.If the owner is not uucp, the UUCP-related programswill not be able to open the device.Reviewing the permissions for the associated device usingthe ls -l command shows that the owner of the device file is root, not uucp.As a result, uucpcouldn t open the device
[ Pobierz całość w formacie PDF ]