Recent Changes - Search:

PmWiki

pmwiki.org

edit SideBar

Tier1

Setting up a Tier 1 node is pretty straight forward as most of the provisioning is automated via a set of Perl scripts. Currently network bootstrapping is only supported by Dataforge. In the future, you will be able to bootstrap off any Tier 1 server, so these instructions are subject to change.

Install UUCP

First you will need to install UUCP. While any UUCP implementation should work, the network predominately uses Taylor UUCP

Debian/Ubuntu sudo apt-get install uucp

FreeBSD TODO

OpenBSD TODO

IRIX TODO

Setup UUCP user

The UUCP user does not have a shell by default. You will need to modify the uucp user to have a bash login shell. You will need to perform subsequent steps as the uucp user.

sudo usermod -s /bin/bash uucp

Install git

You will need to install git if it's not already installed on your system.

sudo apt install git

Clone the repository

You will need to create pull requests to the tildeverse UUCP git repository. First, create a tildegit.org account and clone the tildeverse/uucp repository. Then, clone your new repo onto the target machine. Do this as the uucp user and from the home directory for the uucp user (usually /var/spool/uucp/). The $HOME directory for uucp can be obtained using echo ~uucp or getent passwd uucp.

Create and distribute SSH key

First, create the folder where these files will be stored, and set the appropriate permissions.

sudo mkdir -p /var/spool/uucp/.ssh
sudo chown uucp:uucp /var/spool/uucp
sudo chown uucp:uucp /var/spool/uucp/.ssh
sudo -u uucp touch /var/spool/uucp/.ssh/authorized_keys
sudo -u uucp chmod 600 /var/spool/uucp/.ssh/authorized_keys

Generate a new keypair for uucp to use when authenticating with other systems.

sudo -u uucp ssh-keygen -t rsa

This will create two files, rsa and rsa.pub. The first is your private key, the second is your public key. Place both of these files in the .ssh folder under the uucp user's home directory (usually /var/spool/uucp). Your private key should be located at /var/spool/uucp/.ssh/id_rsa. Don't specify a passphrase.

Add SSH public key to global authorized_keys

1. Your entry to the authorized_keys file must be in the following format:

no-port-forwarding,no-X11-forwarding,command="/usr/sbin/uucico -l" <ssh_key>

where <ssh_key> is your node's id_rsa.pub key

2. Add your desired node name to the nodelist file. Each line in the nodelist has the format

systemname,hostname

The hostname is your fully-qualified domain name, e.g. uucp.dataforge.tk.

General system naming conventions are as follows:

- Tildes are named based on their TLD name - ie; tilde.team would be team - Pubnixs are domain names without TLD - ie; hashbang.sh would be hashbang - Leaf nodes are the system hostnames.

2. Push your entry to the UUCP repo. This will update all other Tier 1 nodes with your key and node ID.

sudo -u uucp git add nodelist ssh/authorized_keys
sudo -u uucp git commit
sudo -u uucp git push

3. Create a new pull request for the tildeverse/uucp repo.

4. Create a cron job for the uucp user to run the update.sh script every 10 minutes. Add the following lines to the crontab for uucp:

# update the repository every 10 minutes
*/10 * * * * ~/uucp/update.sh
# run uucico every hour to retry failed jobs
0 * * * * uucico -r1

To edit the crontab for uucp,

sudo -u uucp crontab -e

Initial bootstrapping

In order to bring up a Tier 1 host, it will need to be bootstrapped onto the network. This processes is fully automated and is improving all the time. Please refer to the UUCP mailing list (uucp@lists.tildeverse.org) for updates.

1. The bootstrap.pl script in written in Perl and requires the Digest::MD5 and Getopts::Std perl modules. These can be installed via cpan Digest::MD5 and cpan Getopt::Std, respectively. There are no other dependencies

2. Run ../bootstrap.pl <nodeid>

3. Copy generated files (config,sys,passwd,call,port) to /etc/uucp

sudo cp call config passwd port sys /etc/uucp/

That's it! As soon as your pull request is merged, you will have a working Tier 1 node. When other systems add you to their configuration, you should be able to send and receive files using uucp and uuto/uupick. Read about all of the Taylor UUCP utilities.

Troubleshooting

If you've tried to send files to another system and things aren't going as planned, take these steps. First, check the status of the last connection attempt to other systems using uustat.

uustat -m

If the target system does not appear in this list, then no attempt was made to connect to it. Verify that the system you are trying to connect to is a valid node using uuname. uuname will return the names of all the systems that are configured for uucp.

The status from uustat -m will likely give one of the following status values:

Conversation complete
This indicates that the transport is working. It is possible that the permissions on the destination machine don't let uucico write to the destination. In this case, the error would be reported in /var/log/uucp/Log. Check the log to confirm. Many systems do not permit the uucp user to write outside of the public directory, usually /var/spool/uucppublic. You will need to contact the administrator of the target system to resolve the issue. Permissions on the public folder should be set to 1777.
Handshake failed
This indicates that there was a failure when talking to the uucico process on the target machine. This could mean that the chat script is incorrect or the password is missing or wrong. Debug by running sudo -u uucp uucico -S target -x3. Then check the contents of /var/log/uucp/Log and /var/log/uucp/Debug. If the target system has not added your system's information to the config, it may appear that your password is rejected.
Login failed
This indicates a failure in establishing the ssh connection. This also manifests as a broken pipe reported in the /var/log/uucp/Log. This could be caused by an incorrect/missing key, your key requiring a passphrase, or something along those lines. First, ensure that your private key is located at /var/spool/uucp/.ssh/id_rsa. Debug by running ssh interactively as the uucp user (e.g. sudo -u uucp <command>). Find the ssh command in /etc/uucp/port. Replace the -q option to ssh with -v (note that using both -q and -v will suppress output). If the target system hasn't added your key to their authorized_keys file, your connection will fail with the message "Permission denied (publickey)."

If your attempt to send a file failed, the job should appear in the list of jobs.

uustat -q

If there is no pending job for the target system, you will need to create a new one using uucp or uuto. If there is a pending job for the target system, you can force uucico to try sending it again using:

sudo -u uucp uucico -S target -x3

Repeat the steps above to check and troubleshoot the result.

Edit - History - Print - Recent Changes - Search
Page last modified on April 27, 2019, at 04:01 PM