1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 03:32:12 +00:00
iiab/roles/iiab-admin/README.rst

74 lines
5.5 KiB
ReStructuredText
Raw Normal View History

2018-09-20 07:47:45 +00:00
.. |ss| raw:: html
<strike>
.. |se| raw:: html
</strike>
.. |nbsp| unicode:: 0xA0
:trim:
2017-05-27 18:09:50 +00:00
=================
2018-09-20 07:47:45 +00:00
iiab-admin README
2017-05-27 18:09:50 +00:00
=================
`Internet-in-a-Box <https://internet-in-a-box.org>`_ (IIAB) encourages you to pay attention to the security of your learning community.
2017-05-27 18:09:50 +00:00
2020-10-15 06:10:15 +00:00
This Ansible playbook is one of the very first that runs when you install IIAB, and we hope reading this helps you understand your choices:
2017-05-27 18:09:50 +00:00
2020-10-15 06:10:15 +00:00
Configure user 'iiab-admin'
---------------------------
2020-10-16 01:56:23 +00:00
* `admin-user.yml <tasks/admin-user.yml>`_ configures a Linux user that will give you access to IIAB's Admin Console (http://box.lan/admin) after IIAB is installed — and can also help you at the command-line with IIAB community support commands like {iiab-diagnostics, iiab-hotspot-on, iiab-check-firmware, etc}.
* If initial creation of the user and password was somehow not already taken care of by IIAB's 1-line installer (https://download.iiab.io) or by your underlying OS, that too will be taken care of here.
2020-10-16 01:56:23 +00:00
* By default this user is ``iiab-admin`` with password ``g0adm1n``
2020-10-14 03:57:24 +00:00
* *Do change the default password if you haven't yet, by running:* **sudo passwd iiab-admin**
2020-10-15 06:46:27 +00:00
* After IIAB is installed, you can also change the password by logging into Admin Console (http://box.lan/admin) > Utilities > Change Password.
* If you prefer to use a pre-existing user like ``pi`` or ``ubuntu`` (or any other username) customize the variable ``iiab_admin_user`` in your `/etc/iiab/local_vars.yml <https://wiki.iiab.io/go/FAQ#What_is_local_vars.yml_and_how_do_I_customize_it%3F>`_ (preferably do this prior to installing IIAB!)
2020-10-17 00:32:08 +00:00
* You can set ``iiab_admin_can_sudo: False`` if you want a strict security lockdown (if you're really sure you won't need IIAB community support commands like `/usr/bin/iiab-diagnostics <../../scripts/iiab-diagnostics.README.md>`_, `/usr/bin/iiab-hotspot-on <../network/templates/network/iiab-hotspot-on>`_, `iiab-check-firmware <../firmware/templates/iiab-check-firmware>`_, etc!)
2020-10-15 06:10:15 +00:00
* You can also set ``iiab_admin_user_install: False`` if you're sure you know how to do all this `account and sudo configuration <tasks/admin-user.yml>`_ manually.
2020-10-15 06:42:17 +00:00
Security
--------
2020-10-15 06:10:15 +00:00
2020-10-16 01:56:23 +00:00
* A user MUST be a member of at least one of these 2 Linux groups, in order to log in to IIAB's Admin Console: (http://box.lan/admin)
2020-10-17 00:32:08 +00:00
#. ``iiab-admin`` (specified by ``admin_console_group`` in `/opt/iiab/iiab/vars/default_vars.yml <../../vars/default_vars.yml>`_ and `/opt/iiab/iiab-admin-console/vars/default_vars.yml <https://github.com/iiab/iiab-admin-console/blob/master/vars/default_vars.yml>`_)
#. ``sudo``
2020-10-15 06:10:15 +00:00
* Please read much more about what escalated (root) actions are authorized when you log into IIAB's Admin Console, and how this works: https://github.com/iiab/iiab-admin-console/blob/master/Authentication.md
* If your IIAB includes Tailscale (VPN), ``/root/.ssh/authorized_keys`` should be installed by `roles/tailscale/tasks/install.yml <../tailscale/tasks/install.yml>`_ to facilitate remote community support. Feel free to remove this as mentioned here: https://wiki.iiab.io/go/Security
2020-10-17 00:32:08 +00:00
* Auto-checking for the default/published password (as specified by ``iiab_admin_published_pwd`` in `/opt/iiab/iiab/vars/default_vars.yml <../../vars/default_vars.yml>`_) is implemented in `/etc/profile.d <templates/sshpwd-profile-iiab.sh>`_ (and `/etc/xdg/lxsession/LXDE-pi <templates/sshpwd-lxde-iiab.sh>`_ when it exists, i.e. on Raspberry Pi OS with desktop).
2020-10-15 06:10:15 +00:00
2020-10-15 06:42:17 +00:00
Example
=======
2020-10-14 03:57:24 +00:00
2020-10-15 06:10:15 +00:00
* If you later change your mind about ``sudo`` privileges for user 'iiab-admin' (as specified by ``iiab_admin_user``) then do this:
#. Go ahead and change the value of ``iiab_admin_can_sudo`` (to either True or False) in `/etc/iiab/local_vars.yml <https://wiki.iiab.io/go/FAQ#What_is_local_vars.yml_and_how_do_I_customize_it%3F>`_
2020-10-15 06:10:15 +00:00
#. Make sure that ``iiab_admin_user_install: True`` is also set.
#. Then re-run this Ansible playbook, by running ``cd /opt/iiab/iiab`` followed by ``sudo ./runrole --reinstall iiab-admin``
2020-10-14 03:57:24 +00:00
2020-10-15 06:42:17 +00:00
Historical Notes
================
2017-05-27 18:09:50 +00:00
* We no longer support setting your password using a hash e.g. ``python -c 'import crypt; print crypt.crypt("<plaintext>", "$6$<salt>")'`` (or the Python 3 equivalent, ``python3 -c 'import crypt; print(crypt.crypt("<plaintext>", crypt.mksalt(crypt.METHOD_SHA512)))'``) as these are very cumbersome — and worse, exposing your "salt" opens up your password to `possible attack <https://stackoverflow.com/questions/6776050/how-long-to-brute-force-a-salted-sha-512-hash-salt-provided>`_. [October 2020]
* The sudo flag ``NOPASSWORD:`` and the ``wheel`` group are similarly no longer recommended, so that your IIAB faces fewer security risks. [October 2020]
2020-10-15 06:10:15 +00:00
2020-10-17 00:32:08 +00:00
Remote Support Tools
--------------------
2020-10-15 06:10:15 +00:00
The `iiab-diagnostics <../../scripts/iiab-diagnostics.README.md>`_ and `Tailscale (VPN) <https://en.wikipedia.org/wiki/Tailscale>`_ options mentioned above can greatly help you empower your community, typically during the implementation phase of your project, even if Linux is new to you.
2017-05-27 18:09:50 +00:00
Similarly, `tasks/main.yml <tasks/main.yml>`_ adds a couple text mode tools — extremely helpful over expensive / low-bandwidth connections:
2017-05-27 18:09:50 +00:00
* `lynx <https://en.wikipedia.org/wiki/Lynx_(web_browser)>`_
* `screen <https://linuxize.com/post/how-to-use-linux-screen/>`_
2020-10-17 00:32:08 +00:00
*More great tools to help you jumpstart community action at a distance:*
2020-10-15 06:10:15 +00:00
* `FAQ.IIAB.IO <https://wiki.iiab.io/go/FAQ>`_ > "How can I remotely manage my Internet-in-a-Box?"
2020-10-15 06:10:15 +00:00
2017-05-31 16:08:09 +00:00
Admin Console
-------------
2017-05-27 18:09:50 +00:00
2020-10-14 03:57:24 +00:00
Has been moved to this separate git repo: https://github.com/iiab/iiab-admin-console