• Aucun résultat trouvé

Setting Up a UUCP Connection

Dans le document Workstation Manual (Page 106-110)

601. Network Configuration

6.4. Setting Up a UUCP Connection

uucp (UNIX to UNIX copy) is a series of programs designed for communication, via dial-up or hardwired lines, between two systems running UNIX. uucp may be used to transfer files between UNIX systems, and also to run commands on remote machines. For more detailed background, see the UUCP Implementation De,cription in the Tutorial, section of this manual.

Support for uucp is located in three major directories: I u~rl bin (which contains user commands), lu,rllibluucp (operational commands), and lu,rl,poolluucp (spooling area).

The commands in /u,r/bin are:

The important files and commands in lu,r/ lib/ uucpare:

/usr/lib/uucp/L-devices

systems to communicate with, how to connect, and when sequence numbering control file

script for weekly cleanup of uucp log files site-polling script

cleans up garbage files in spool area uucp remote~execution server

The spooling area,

i

u,r/ '1'001/ uucp, contains the following important files and directories:

/usr/spooljuucp/C.

Note that C., D., and D.ho,tntJme are subdirectories, unlike earlier implementations ofuucp. In older versions, C. and D. files are placed directly into the spooling directory, /u,r/,pool/uucp; in the current version, they are placed in their appropriate subdirectory. So, in the old version you'd have, say, / u,r/ '1'001/ uucp/ C.re,45n0091; in the new version the file would be / u,r 1'1'001/ uucpl C./ C. re,,l 5n 0091.

As uucp operates it creates (and removes) many small files in the directories underneath / u,r/ '1'001/ uucp. Sometimes files are left undeleted; these are most easily purged with the uucletJn program. Instructions in the uUCp.titJlI file take care of doing this daily clean-up for you.

The uucp log files can grow without bound unless trimmed back; uulog is used to maintain these files. uucp.titJlI and uucp.week manage this housekeeping. If you decide to prune these direc-tories yourself, be careful: randomly removing files from / u,r/ '1'001/ uucp may cause uucp to gen-erate error messages when it tries to access a file another file claims is there. (For instance, each mail transaction creates three files. ) You do, however, need to clean the / u,r / '1'0011 uucppublic directory 'manually'; this is a place for people at other sites to send to when sending files to

6-14 Revision H of 12 March 1984

Sun 100/150 Installation Manual System Set-Up and Operation users at your site.

uuep occasionally sends mail about minor problems to "uucp" or "root". Your maintenance person should also read and toss these messages. You can redirect the mail to your mailbox by putting an entry for "uucp" in /u,r/lib/alia,e,. Look at the examples there.

Under normal conditions, uuep calls your designated sites at specified times and, while it's at it, checks to see if anything should come back. If you ever need to invoke uuep 'on command', the line:

:/I:

/usr/lib/uucp/uucico -rl -s,itename

forces uuep to poll ,itenamf:, even if there is nothing waiting. If you do run uuep in this fashion, don't run it as super-user, since the suid* bit will not be honored. If you are having trouble with the connection, run uuep with the debugging option, as described in installation step 7, below.

6.4.1. UUCP Installation Overview

A uuep network link using modems or dedicated lines may be established between two machines running UNIX systems. To establish a connection between two sites that both have modems, one site must have (at least) an automatic call unit (an auto-dial modem) and the other must have (at least) a dialup port (an auto-answer modem). It is better if both sites have one of each or, as is standard, have modems which both call and answer, like Ventel's.

If both you and the site(s) you wish to connect with have autodial units and ports, install uuep as follows. If you have only a dialup your situation will be different; procedures are described near the end of this section. For more information, read the VueI' Implementation De,eription in the final section of this manual. It describes in detail the file formats and conventions, and will give you necessary context.

1. Select a site name (less than 8 characters): the name of the machine which will be your uuep connection to the outside world. We will call this machine your 'uuep host'; its name is your 'uuep hostname'.

If this machine is your "main machine" (see Setting VI' the Mail Syltem, above), then your uuep hostname should be the same as your domain name.

2. Change the / u,r/ ,pool/ uuep/ D.noname directory to your own site's /u,r/'pool/uuep/D.ho,tname directory with the following:

:/I:

mv /usr/spool/uucp/D.noname /usr/spool/uucp/D.holtname Use your uuep hostname for ho,tname.

3. Create a uuep account in the password file on your uuep host machine by entering a line of the following form in / etcl pa"wd:

Uholtname:.:4.:4:::/usr/spool/uucp:/usr/lib/uuep/uueieo Now use the pa"wd command to establish a password for your host:

*

pa.sswd Uho,tname

• "suid" stands for "set user i.d."; if you set this bit on an executable file, UNIX will grant or deny file access based on the permissions of the file's owner, rather than the permissions of the person who executes the file. Uuep uses this facility to ensure that all the files in its spool directories are readable and write able no matter who invokes the uuep program.

4. The L.,g, file contains the phone numbers and login sequences required to establish a con-nection with a uucp daemon on another machine. Edit /u,r/li6/uucp/

L.'I/',

adding a line of the following form for each site you want to talk to:

their_ho,t Any device baud phone# login:-EOT-Iogin: uuep 88wol'd: pa88 The first field is the uucp hostname of the other site, the second indicates when their host may be called, the third field specifies how their host is connected (through an ACU, a hardwired line, etc.), then comes the baud rate of the line, phone number to use in connect-ing through an auto-call unit, and finally a login sequence. The phone number may contain common abbreviations which are defined in the L-dialcode, file. The device specification (third field) should refer to devices specified in the L-device, file. Note that the only modem type currently supported by Sun Microsystems is the Ventel MD212 modem. Indi-cating only "ACU" causes the uucp daemon, uucico, to search for any available auto-call unit in L-device,. For example, our L.,g, file looks something like:

adiron Any ACUVENTEL 1200 762088310gin:-EOT-login: uucp ssword: secret

ucbvax Any,20 ACUVENTEL 1200 6728212% login:-EOT-Iogin: uucp ssword: almama ucbarpa Any,20 ACUVENTEL 1200 6424351 login:-EOT-Iogin: uucp ssword: netnut decvax Any ACUVENTEL 1200 6039941241 login:-EOT-Iogin: Ujedi ssword: cannon For hardwired lines, your L.'I/' lines should contain the tty device name in the third and fifth fields:

anyname Any ttyb 1200 ttyb login:-EOT-Iogin: uucp ssword: sunrise

5. Connect your (auto-dial/auto-answer) modem to ttya (the port labelled 'RS-232-A' on the backpanel of your Sun Workstation) on your host machine.

6. Create the appropriate device for your modem with the following series of commands:

:/I:

ed /dev type the following to initialize everything properly:

:/I: k1u-l

1 are reasonable choices. If you get immense quantities of output from this command, every-thing is fine; you can go on to edit the following files.

Revision H of 12 March 1984

Sun 100/150 Installation Manual System Set-Up and Operation 10. Edit the files tJtJcp.day, tJtJcp.noon, and tJtJcp.night, in the /tJ,r/lib/tJtJcp directory. Each of these files has a 'for' loop which arranges to call sites you want to call at designated times for mail. In each file, find the line that says:

for i in sys.name

and change "sys.name" to the site name(s) you want to poll. For example:

for i in ucbvax ucbarpa Shasta navajo

11. Add the tJtJcp.day, tJtJcp.noon, tJtJcp.night, tJtJcp.hotJr, and tJtJcp.week, files to /tJ,r/lib/crontab (see cron(8», which arranges for the appropriate sites to be polled at the appropriate times.

For example, the entries in crontab might look like:

5 6

* * *

su uucp

<

/usr/lib/uucp/uucp.day 15 12

* * *

su uucp

<

/usr/lib/uucp/uucp.noon 30 23

* * *

su uucp

<

/usr/lib/uucp/uucp.night 10,30,50

* * * •

su uucp

<

/usr/lib/uucp/uucp.hour

o

7

* *

2 su uucp

<

/usr/lib/uucp/uucp.week

If you have only a dialup, you can be a second-class citizen on the tJtJCp net. You must find another site that has a dialer, and have them poll you regularly (once a day is. about the minimum that is reasonable). \Vhen you send mail to another site, you must wait for them to call you. To handle installation for a passive node, just complete steps one through four in the procedures above. When you come to the final step, editing / tJ,r/lib/ tJtJcp/ L.,y" you don't need to specify all the information called for in the step: only the first two fields of L.,y, are necessary, and in practice only the first field (site name) is looked at. A typical L.,y, for a pas-sive node might be:

ucbvax None research None

where the first field on each line is a site that will poll you. Next, put a password on the uucp login. Then let the other site know your phone number, tJtJcp login name, and password.

Dans le document Workstation Manual (Page 106-110)