-*- org -*-

* Prerequisites
  
** Operating System
   
   Debian 8.0 "jessie" or Ubuntu 15.10 "Wily Werewolf" (or later).
   
   This is mostly for the support scripts which make sure that the
   client is installed and started in the initial RAM disk environment
   and that the initial RAM file system image file is automatically
   made unreadable.  The server and client programs themselves *could*
   be run in other distributions, but they *are* specific to GNU/Linux
   systems, and are not written with portabillity to other Unixes in
   mind.
   
** Libraries
   
   The following libraries and packages are needed.  (It is possible
   that it might work with older versions of some of these, but these
   versions are confirmed to work.  Newer versions are almost
   certainly OK.)
   
*** Documentation
    These are required to build the manual pages for both the server
    and client:
    
    + DocBook 4.5         http://www.docbook.org/
      Note: DocBook 5.0 is not compatible.
    + DocBook XSL stylesheets 1.71.0
                         http://wiki.docbook.org/DocBookXslStylesheets
    
    Package names:
    docbook docbook-xsl
    
    To build just the documentation, run the command "make doc".  Then
    the manual page "mandos.8", for example, can be read by running
    "man -l mandos.8".
    
*** Mandos Server
    + GnuTLS 3.3          https://www.gnutls.org/
    + Avahi 0.6.16        http://www.avahi.org/
    + Python 2.7          https://www.python.org/
    + dbus-python 0.82.4 https://dbus.freedesktop.org/doc/dbus-python/
    + PyGObject 3.7.1     https://wiki.gnome.org/Projects/PyGObject
    + pkg-config https://www.freedesktop.org/wiki/Software/pkg-config/
    + Urwid 1.0.1         http://urwid.org/
      (Only needed by the "mandos-monitor" tool.)
    
    Strongly recommended:
    + fping 2.4b2-to-ipv6      http://www.fping.org/
    + ssh-keyscan from OpenSSH http://www.openssh.com/
    
    Package names:
    avahi-daemon python python-dbus python-gi python-urwid pkg-config
    fping ssh-client
    
*** Mandos Client
    + GNU C Library 2.16 https://gnu.org/software/libc/
    + initramfs-tools 0.85i
                        https://tracker.debian.org/pkg/initramfs-tools
    + GnuTLS 3.3        https://www.gnutls.org/
    + Avahi 0.6.16      http://www.avahi.org/
    + GnuPG 1.4.9       https://www.gnupg.org/
    + GPGME 1.1.6       https://www.gnupg.org/related_software/gpgme/
    + pkg-config https://www.freedesktop.org/wiki/Software/pkg-config/
    
    Strongly recommended:
    + OpenSSH           http://www.openssh.com/
    
    Package names:
    initramfs-tools libgnutls-dev libavahi-core-dev gnupg
    libgpgme11-dev pkg-config ssh

* Installing the Mandos server
  
  1. Do "make doc".
  
  2. On the computer to run as a Mandos server, run the following
     command:
     For Debian: su -c 'make install-server'
     For Ubuntu: sudo make install-server
     
     (This creates a configuration without any clients configured; you
     need an actually configured client to do that; see below.)

* Installing the Mandos client.
  
  1. Do "make all doc".
  
  2. On the computer to run as a Mandos client, run the following
     command:
     For Debian: su -c 'make install-client'
     For Ubuntu: sudo make install-client
     
     This will also create an OpenPGP key, which will take some time
     and entropy, so be patient.
  
  3. Run the following command:
     For Debian: su -c 'mandos-keygen --password'
     For Ubuntu: sudo mandos-keygen --password
     
     When prompted, enter the password/passphrase for the encrypted
     root file system on this client computer.  The command will
     output a section of text, starting with a [section header].  Copy
     and append this to the file "/etc/mandos/clients.conf" *on the
     server computer*.
  
  4. Configure the client to use any special configuration needed for
     your local system.  Note: This is not necessary if the server is
     present on the same wired local network as the client.  If you do
     make changes to /etc/mandos/plugin-runner.conf, the initrd.img
     file must be updated, possibly using the following command:
     
	# update-initramfs -k all -u
  
  5. On the server computer, start the server by running the command
     For Debian: su -c 'invoke-rc.d mandos start'
     For Ubuntu: sudo service mandos start
     
     At this point, it is possible to verify that the correct password
     will be received by the client by running the command:
     
	# /usr/lib/mandos/plugins.d/mandos-client \
		--pubkey=/etc/keys/mandos/pubkey.txt \
		--seckey=/etc/keys/mandos/seckey.txt; echo
     
     This command should retrieve the password from the server,
     decrypt it, and output it to standard output.
     
     After this, the client computer should be able to reboot without
     needing a password entered on the console, as long as it does not
     take more than five minutes to reboot.

* Further customizations
  
  You may want to tighten or loosen the timeouts in the server
  configuration files; see mandos.conf(5) and mandos-clients.conf(5).
  If IPsec is not used and SSH is not installed, it is suggested that
  a more cryptographically secure checker program is used and
  configured, since, without IPsec, ping packets can be faked.

#+STARTUP: showall
