Compare commits

..

No commits in common. 'master' and 'master' have entirely different histories.

  1. 7
      README.md
  2. 16
      nodelist
  3. 19
      ssh/authorized_keys
  4. 2
      update.sh
  5. 68
      utils/bootstrap.pl

7
README.md

@ -2,7 +2,7 @@
These are utility scripts for UUCP sever provisioning and maintenance.
More information is available at https://uucp.tildeverse.org
More information is available at https://uucp.dataforge.tk
## Prerequisites
In order to use these scripts you will first have to install the UUCP server software. While in theory any implementation of UUCP
@ -25,9 +25,6 @@ Provisioning a Tier 1 server is easy. Simply run the ./utils/bootstrap.pl file a
```
./bootstrap.pl <assigned_node_name>
mv call config passwd port sys /etc/uucp
chmod 0640 /etc/uucp/call /etc/uucp/passwd
chown -R uucp:uucp /etc/uucp
```
Setting up a leaf node is similar, however, you must edit the nodelist file with a single entry of the server that you are joining. You will need
@ -40,5 +37,5 @@ A Tier 1 system must be able to receive updates about the network topology. You
You can get help by joining us on IRC. We're nice. We promise :D
### Authors
Wesley Fisher (aka; Praetor) - Dataforge - wfisher@dataforge.network
Wesley Fisher (aka; Praetor) - Dataforge - wfisher@dataforge.tk

16
nodelist

@ -1,8 +1,8 @@
team,tilde.team,22
voyage,cosmic.voyage,22
institute,tilde.institute,22
aussie,aussies.space,22
epfl,uucp.cothority.net,22
frostbyte,uucp.frostbyte.cc,22
radiofreqs,radiofreqs.space,22
caconym,dgold.eu,22
team,tilde.team
voyage,cosmic.voyage
center,tilde.center
dataforge,uucp.dataforge.tk
institute,tilde.institute
aussie,aussies.space
epfl,uucp.cothority.net
frostbyte,uucp.frostbyte.cc

19
ssh/authorized_keys

@ -1,9 +1,10 @@
restrict,command="/usr/sbin/uucico -u Uteam -l" ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBaPW5orOACAl5GdTtn7CYDH+aAyCqOSsf/QHdH3WFST uucp@tilde
restrict,command="/usr/sbin/uucico -u Uvoyage -l" ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDCENRbdhPRoI1c0dcQM8bqcpeEpq4dck8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jTpLkFvgboBXkmh1H8QNrvnTFF+MCBn5v+YQ7U6/ynebDMKxgpMHC1gvazCt1B6UgM7dIIOg7YcK7ZMDed10Sq2qVkZdDbncLizTkK78kmYqSrATj4T5mxi90mFD41XxC0p/lrW5CyDucGYYLWP6tGVbgEUE4MPO0ZV+p8i2QQS1FfD5VAa0b+v4Os5VEayL0HO1Wq6X55jTOd8MYGJ6+fWQRwvDIdyKVe7afz1hQ6CpPBYT3/603b6L8K3A8/MJDjeA1eu47LWsKE6hSr0859TiIxPVsBeDRBucEAX6Lz2p2gVg8kBbU9EhSe/O56NT1DezRlaDNT+R2/ALNoSeWkVoQ5u2FIv8FW1QeI1KvTaRUs1+/+mfthG7Hc0x5CEjTiBLAosyqrwS+5Qtdz7a/k2tWyXQ== uucp@tilde.institute
restrict,command="/usr/sbin/uucico -u Uaussie -l" ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRo+3geI6OcpyEC3XufkKUQ193Y0Y4NR82EnCjojpraCRy9yazzCHzJIz/rhPzpJYiTJ3blNqyTIM3rfMg+mALehnNBJPi5h1tBC0Qv60aLGtsYDHrovIG1YNc9ln/nfAriisIXU+wWh8K0KOiDcvtHuLRZnUbGyDLBP8bp/Lku7bz+N8ucRvSdt5O0vDCv/AVsz9JIP5HBkUcY42PNM1rHAzWddVLJ1msQmyMnib6LyKJ5RAJJbSER6xXFpSDPHfKQsbr5XbPJT4P1KiI54jhwXBZddH4ZRyLiqTz16NYWDrYBeVHsLmFv8vL/j7/dzDyiV8okl+Nknb3aTXrQ1tb uucp@aussie
restrict,command="/usr/sbin/uucico -u Uepfl -l" ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKHc5n4OT1n52HbQir3ON0pwtkgTjTNKSlgDziSKhOdT jeff.allen@epfl.ch
restrict,command="/usr/sbin/uucico -u Ufrostbyte -l" ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDpJo1XBdJXecYZPkTrfX4MT25GQ3bm5pjrh3w2SV/h2x69zFrV1pB+MAJHpstY6mdK+4YjMZ8t4A3xRwuJT/LZegQf9vi0Bi4lY02an6jpLIoOXxp5xG2jwCYBURy70CBAG8FgRjqs5uUNf1l9skFfKke71p4FU/14LW0vj5K60L8Y/LlVVQCqxr1w790G/HHqFjsrGwN1Jt+nk8IbHr1Mfi5NAqsocbRUfhVsB8M2y+IlBUnxDFtw9LnehPBflESa2iISroDMYpzH1eg+zbrGKutzSUY4PMqwgSNDOTwwA8r+3rtXzf+QFR00y8gr5ZIho2rz2KjbLpzixTJ4W0px uucp@uucp.frostbyte.ccssh-rsa
restrict,command="/usr/sbin/uucico -u Uradiofreqs -l" ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDWl41JEIAWQpn2w/ius7CvBh379bCOB1OFljOcZAtOu4NN9RPK3v4qC8aWHm3icqPOZalDPsSTZ9uJ5ox8DZH+tvNtWiJeLPvu6NxyAyePBqlBaxkTC9yaBwgWFceGlqttMilo+ALxi5BleFlQxwOywxV1RdhzaMl0/MxeWBOHtKF6w/bt6v23zR/5l8Q/e6a0HUBwjLv6VL5fFLXB9PrCX/fjgw8v44YVSQP+hCukUO/9WqApTFkvkHf+kHVwJRS5L8DIgZZTEtzTezRbLEqfsdQXPFOePiGj2kvzA307PubVupvSoSjmXNhQ2dASi7s2ubu2E5dKCminVKtokBYL uucp@radiofreqs.space
restrict,command="/usr/sbin/uucico -u Ucaconym -l" ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCqX+riAKAJnoFdlun0kdYSld6rsfh9RHhRPHbgd/CmY0i0HSJoOiDk57fhbvYLZ4QUOruMWBw1vEUFkaFzyxfiu42C7L8xjh9lqzGWI4xhap2e9bIP3lUoMqBrxsaWJk+6/sRoNDNhITZxPEJig2rmEHFU7GO7Z3v+GkshiYTcstFvj3OttQne2cZdNIO5AekqNhUBHv9mUSBnSTUf4t4VOiQP7+/VWYtu9sogzAzgZbY+L6j3hbZCxaLJtKKRJ+8ns+9Zdzb1q55IlKUB/umFQg/Aff25oitEy6MszGV66aEyVBe04CiiWwAH15W3OLpNmkPzZLQBSnBQ4Rd2oIkZ uucp@dgold
no-port-forwarding,no-X11-forwarding,command="/usr/sbin/uucico -l" ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDUqrOtLNKN033OeoJtkGMKgEev+tgVAuKvDa//thWkhjvqxi2QtJ7gO1L9LsGXKSCfRLFZYJp04Zkz9/8BywGmPYknGkz9dyKlSk6/cLQ5Dc1Y01KcikFbNW8SaL+B2upBO8tYGDiTcNWlmZj2bFzcaT/sSUATPBcmlAcQqXgLLcWfo5H4mG1Ghha0IKSyGYDuyWCHHE5V7+jPFIApNAPc0cF9gZGTv8mjxODNW66qLs7bMjNAL3T47qzIx2Mc1nKuZTmA//heZ2OvnDrg9aWKFDeyJV4ovkIdfyErKqk8rq7G1i2Q+Vy2uxHV9CYIWCJ3KXQTyGzt9KTYSRaGFXw9 uucp@mail
no-port-forwarding,no-X11-forwarding,command="/usr/sbin/uucico -l" ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC+ZXG9cN7CTPoUmxlJLPiAct7/z8uG43VK0TZUtNeaO35medG8DR8pflm+KHZstJZp11Vpqtg1lTotYy3BL91KLWWkHj/sKLeoEUdhtbprm0vkXrHxzcyoPkunOyvk91dZnwY/JpoHrJUKyDIZGz+vHQ7MFzRB+x+7Yodx+wiQqE7zXzi0AuRXmsKhJa/mV10ZhHGEPbWuFj+vj7qqmVhU+B5OkL/rr6F8iVB/oCiXShGUIMHCSlYSQj50a5LmD2/9Bwl2QcLrhrNF1inHIgzRpYsBl1peJpiE/1NRiQZneneog/DQQvlsumdpwHiM9T5RL9vGU42PBL4kxclZqspd uucp@uucp
no-port-forwarding,no-X11-forwarding,command="/usr/sbin/uucico -l" ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBaPW5orOACAl5GdTtn7CYDH+aAyCqOSsf/QHdH3WFST uucp@tilde
no-port-forwarding,no-X11-forwarding,command="/usr/sbin/uucico -l" ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDCENRbdhPRoI1c0dcQM8bqcpeEpq4dck8pRsGXRMCkwJBPMWk861nlx8H4hZsU7rpJAcgHGX3JwxEPEOGCC2vB4vv46K5eeiVkp5EmDH67K/9TjSzuX0qT+y6tECuXjB2dn3NQJpp0zh681hCszcjy8WxA4+a71HVfQPX2xE4Y6MCz7fTYaumXs9hpetVAgonzlP7W1h6zft+jAsrGDo8FrwAOCubw6/Ra1uAE5Ar3Gl8lLFe/eijjbjI2Y/MCZN3dacfqKH75MwY5E+3e7sRxrUaRtJ2sSiKmL+GqMEa916fxsJGlCu3tvVeUjsq3QEo/MI417l9tghOpOoSFaKNv uucp@cosmic.voyage
no-port-forwarding,no-X11-forwarding,command="/usr/sbin/uucico -l" ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCqZ76dU/vwv4nvmYcRW/4HhJyJDWnI1yv/asY0MFsr1pLDRWZ+YgOs+Ss6KH3nxOF4yGJd1ODO2Sru2zzjdljegl00/wJ/HTAO2HI5HLPJzH5uRXk+M48YtbKPJFE3da87xRmySsaWJgwjDQhLGozfbDiiOe6ZeIgxfByrCfMKkRklkKhkBgbFalqEb5awFeVT7893qd6FQ5CZksHoBIrK8o4eN7TeDSCwx4Z4+xJEBNQQVU50ThEaDxCWdnzE2AZZGX0MbN3IM6VmWW4lBu/cxrx9o6Dkyap5iEd8orx+ddGcKA1rDaplvBhlXynEuotmlWs7UgR1Yv5FSMjOb6AH uucp@hadrian
no-port-forwarding,no-X11-forwarding,command="/usr/sbin/uucico -l" ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDp1sXCxtJ0ed240fNsqsrhXoZskKiEWTSnRPrvCpM+HByUJ4XvBy/L0LJNe1nWXg70N8tYZZTKfUsnrtWEEp8V/7/UalBSIUeSM/nf+TG9cYjBZepYwvrk4s7lsj6XD7Q5GtN3Iv1wBKwElRuuAJ8boajqa7zsjcW+miUTXbf1y/fpUomHhRdU3pnbGMe/vAUR82ex93/LQx66AbZVqyCvDDHFmLaWFZLkMaJ2aSQ0mK5g5OMuzU4P4tGkExTkh8XaIi5tABEF9eieAJC7WDt3XIN7KYott3lL8jh5x5qMQoK4lXMYIrd9ZS2KjHI27CgWfNcqRn6yXpgIebXLVMZ9 uucp@tilde.center
no-port-forwarding,no-X11-forwarding,command="/usr/sbin/uucico -l" ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDAvleeZgYvqi4RrjEj7EwTZEJ3NMYnL+cF3nL/6oTzOQe7n9Yy8Usj4dmrMnxOgtqKJHR0qgPDEk0bzreys1UBsw8vHYTNqdrORa9J+hHiuxNL8GmB+aAKZrvzyfWi5YK/ON2sG0wfLaQM3/RYGGUli0wgoDwcUgGsuMwboUIfTRQ+a3jjfQdaw2JbKIH6hUlgKMe/eWJAGzo3GEWJ5t2NHILJFCCeBeXsbsOwTEYM6xt5BqOCMuTu5xadLFMfSttWcmGvF615G0rhy6jTpLkFvgboBXkmh1H8QNrvnTFF+MCBn5v+YQ7U6/ynebDMKxgpMHC1gvazCt1B6UgM7dIIOg7YcK7ZMDed10Sq2qVkZdDbncLizTkK78kmYqSrATj4T5mxi90mFD41XxC0p/lrW5CyDucGYYLWP6tGVbgEUE4MPO0ZV+p8i2QQS1FfD5VAa0b+v4Os5VEayL0HO1Wq6X55jTOd8MYGJ6+fWQRwvDIdyKVe7afz1hQ6CpPBYT3/603b6L8K3A8/MJDjeA1eu47LWsKE6hSr0859TiIxPVsBeDRBucEAX6Lz2p2gVg8kBbU9EhSe/O56NT1DezRlaDNT+R2/ALNoSeWkVoQ5u2FIv8FW1QeI1KvTaRUs1+/+mfthG7Hc0x5CEjTiBLAosyqrwS+5Qtdz7a/k2tWyXQ== uucp@tilde.institute
no-port-forwarding,no-X11-forwarding,command="/usr/sbin/uucico -l" ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRo+3geI6OcpyEC3XufkKUQ193Y0Y4NR82EnCjojpraCRy9yazzCHzJIz/rhPzpJYiTJ3blNqyTIM3rfMg+mALehnNBJPi5h1tBC0Qv60aLGtsYDHrovIG1YNc9ln/nfAriisIXU+wWh8K0KOiDcvtHuLRZnUbGyDLBP8bp/Lku7bz+N8ucRvSdt5O0vDCv/AVsz9JIP5HBkUcY42PNM1rHAzWddVLJ1msQmyMnib6LyKJ5RAJJbSER6xXFpSDPHfKQsbr5XbPJT4P1KiI54jhwXBZddH4ZRyLiqTz16NYWDrYBeVHsLmFv8vL/j7/dzDyiV8okl+Nknb3aTXrQ1tb uucp@aussie
no-port-forwarding,no-X11-forwarding,command="/usr/sbin/uucico -l" ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKHc5n4OT1n52HbQir3ON0pwtkgTjTNKSlgDziSKhOdT jeff.allen@epfl.ch
no-port-forwarding,no-X11-forwarding,command="/usr/sbin/uucico -l" ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDpJo1XBdJXecYZPkTrfX4MT25GQ3bm5pjrh3w2SV/h2x69zFrV1pB+MAJHpstY6mdK+4YjMZ8t4A3xRwuJT/LZegQf9vi0Bi4lY02an6jpLIoOXxp5xG2jwCYBURy70CBAG8FgRjqs5uUNf1l9skFfKke71p4FU/14LW0vj5K60L8Y/LlVVQCqxr1w790G/HHqFjsrGwN1Jt+nk8IbHr1Mfi5NAqsocbRUfhVsB8M2y+IlBUnxDFtw9LnehPBflESa2iISroDMYpzH1eg+zbrGKutzSUY4PMqwgSNDOTwwA8r+3rtXzf+QFR00y8gr5ZIho2rz2KjbLpzixTJ4W0px uucp@uucp.frostbyte.cc

2
update.sh

@ -1,8 +1,6 @@
#!/bin/bash
set -e
# "Updating Git"
cd $HOME/uucp
git pull --quiet

68
utils/bootstrap.pl

@ -3,29 +3,14 @@
use warnings;
use strict;
use Digest::MD5 qw(md5_hex);
use Getopt::Std;
my $myNode = "";
my $passwdFile = "passwd";
my $callFile = "call";
my $confFile = "config";
my $sysFile = "sys";
my $portFile = "port";
my %options = ();
my $myNode = $ARGV[0] || die("usage: ./bootstrap.pl node-id\n");
sub getNodes {
my $nodelist = "../nodelist";
open(my $data, '<', $nodelist) or die ("Cannot open nodelist");
if ($options{t}) {
print("Truncating existing files\n");
truncate($passwdFile,0);
truncate($callFile,0);
truncate($confFile,0);
truncate($sysFile,0);
truncate($portFile,0);
}
print("Generating files\n");
while (my $line = <$data>) {
chomp $line;
@ -35,8 +20,7 @@ sub getNodes {
#$nodeName eq $myNode && continue
my $nodeAddress = $fields[1];
my $nodePort = $fields[2];
generatePort($nodeName,$nodeAddress,$nodePort);
generatePort($nodeName,$nodeAddress);
generateSys($nodeName);
generateCall($nodeName);
generatePasswd($nodeName);
@ -53,18 +37,18 @@ sub generatePort {
my $nodeName = shift;
my $nodeAddress = shift;
my $nodePort = shift;
my $currentNode = ucfirst($nodeName);
my $template = qq{
port $currentNode
type pipe
command /usr/bin/ssh -a -x -q -i /var/spool/uucp/.ssh/id_rsa -l uucp -p $nodePort $nodeAddress
command /usr/bin/ssh -a -x -q -i /var/spool/uucp/.ssh/id_rsa -l uucp $nodeAddress
reliable true
protocol etyig
};
my $portFile = "port";
open(FH, '>>', $portFile);
print FH $template;
}
@ -81,18 +65,19 @@ sub generateSys {
call-password *
called-login U$nodeName
local-send /
local-receive ~
remote-send ~
remote-receive ~
local-receive /var/spool/uucppublic
remote-send /
remote-receive /var/spool/uucppublic
time any
forward ANY
chat \"\" \\d\\d\\r\\c word: \\d\\P
chat \"\" \\d\\d\\r\\c login: \\d\\L word: \\P
chat-timeout 60
protocol t
port $currentNode
commands rnews
};
my $sysFile = "sys";
open(FH, '>>', $sysFile);
print FH $template;
}
@ -100,9 +85,10 @@ sub generateSys {
sub generateConfig {
my $nodeName = shift;
my $confFile = "config";
open(FH, '>>',$confFile);
my $nodeConfig = "nodename\t\t".$nodeName."\npubdir\t\t/var/spool/uucppublic\n";
my $nodeConfig = "nodename\t\t".$nodeName."\n";
print FH $nodeConfig;
}
@ -117,6 +103,7 @@ sub getKeys {
sub generateCall{
my $nodeName = shift;
my $callFile = "call";
my $password = $nodeName.$myNode;
my $callHash = md5_hex($password);
@ -129,6 +116,7 @@ sub generateCall{
sub generatePasswd {
my $nodeName = shift;
my $passwdFile = "passwd";
my $password = $myNode.$nodeName;
my $passwdHash = md5_hex($password);
@ -143,36 +131,14 @@ sub preCheck()
{
print("Updating git repo\n");
chdir("../");
#system("git pull");
system("git pull");
print("Installing authorized_keys\n");
#rename("authorized_keys",".ssh/authorized_keys");
rename("authorized_keys",".ssh/authorized_keys");
chdir("./utils");
print("Pre-flight checks done\n");
getNodes();
}
sub showHelp()
{
print("Usage: bootstrap.pl [OPTION...] node-id\n");
print("Generate uucp configuration files.\n\n");
print(" -t truncate files before appending config\n");
print(" -h display this help and exit\n");
}
getopts("ht", \%options);
if ($ARGV[0]) {
$myNode=$ARGV[0];
} else {
showHelp();
exit;
}
if ($options{h}) {
showHelp();
exit;
}
preCheck();
print("\n\n");
print("This setup script has finished. Please move the generated configuration files as ROOT to /etc/uucp\n");