bootstrap-vz/bootstrapvz/plugins/admin_user
Anders Ingemann 8a8d07991e Merge pull request #291 from nbraud/admin_user
admin_user plugin: Fix non-EC2 behaviour
2016-03-01 00:01:12 +01:00
..
__init__.py admin_user: Add warnings 2016-02-29 20:15:24 +01:00
manifest-schema.yml [admin_user]: Added support for password and static pubkey auth 2016-02-06 00:39:20 -08:00
README.rst admin_user: Allow pubkey & password to be used together 2016-02-10 22:12:02 +01:00
tasks.py chown/chgrp entire .ssh dir to admin_user 2016-02-25 08:27:27 +01:00

Admin user
----------

This plugin creates a user with passwordless sudo privileges. It also
disables the SSH root login. There are three ways to grant access to
the admin user:
-  Use the EC2 public key (EC2 machines only)
-  Set a password for the user
-  Provide a SSH public key to allow remote SSH login

If the EC2 init scripts are installed, the script for fetching the
SSH authorized keys will be adjusted to match the username
specified in ``username``.

If a password is provided (the ``password`` setting),
this plugin sets the admin password, which also re-enables
SSH password login (off by default in Jessie or newer).

If the optional setting ``pubkey`` is present (it should be a full path
to a SSH public key), you will be able to log in to the admin user account
using the corresponding private key
(this disables the EC2 public key injection mechanism).

The ``password`` and ``pubkey`` settings can be used at the same time.

Settings
~~~~~~~~

-  ``username``: The username of the account to create. ``required``
-  ``password``: An optional password for the account to create. ``optional``
-  ``pubkey``:   The full path to an SSH public key to allow
   remote access into the admin account. ``optional``

Example:

.. code:: yaml

    ---
    plugins:
      admin_user:
        username: admin
        password: s3cr3t
        pubkey: /home/bootstrap-vz/.ssh/id_rsa