Move tljh-config symlink to /usr/bin

Removes a lot of 'sudo -E' usage, and eventually should
let us get rid of the $PATH override for jupyterhub-admins,
which arguably is less secure than just dropping stuff into
/usr/bin

Also remove sudo -E from apt and mkdir calls. Not necessary.
This commit is contained in:
yuvipanda
2018-08-12 21:52:04 -07:00
parent 1b19e5bfc6
commit 28af89a381
14 changed files with 50 additions and 48 deletions

View File

@@ -35,7 +35,7 @@ You can set these with ``tljh-config`` with:
.. code-block:: bash
sudo -E tljh-config set auth.<AuthenticatorName>.<property-name> <some-value>
sudo tljh-config set auth.<AuthenticatorName>.<property-name> <some-value>
Example
-------
@@ -47,7 +47,7 @@ to some value, you can do that with the following command:
.. code-block:: bash
sudo -E tljh-config set auth.LDAPAuthenticator.server_address = 'my-ldap-server'
sudo tljh-config set auth.LDAPAuthenticator.server_address = 'my-ldap-server'
Most authenticators require you set multiple configuration options before you can
enable them. Read the authenticator's documentation carefully for more information.
@@ -67,13 +67,13 @@ You can accomplish the same with ``tljh-config``:
.. code-block:: bash
sudo -E tljh-config set auth.type <fully-qualified-authenticator-name>
sudo tljh-config set auth.type <fully-qualified-authenticator-name>
Once enabled, you need to reload JupyterHub for the config to take effect.
.. code-block:: bash
sudo -E tljh-config reload
sudo tljh-config reload
Try logging in a separate incognito window to check if your configuration works. This
lets you preserve your terminal in case there were errors. If there are
@@ -88,5 +88,5 @@ Assuming you have already configured it, the following commands enable LDAPAuthe
.. code-block:: bash
sudo -E tljh-config set auth.type ldapauthenticator.LDAPAuthenticator
sudo -E tljh-config reload
sudo tljh-config set auth.type ldapauthenticator.LDAPAuthenticator
sudo tljh-config reload

View File

@@ -51,11 +51,11 @@ By default, ``sudo`` does not respect any custom environments you have activated
``tljh-config`` symlink
========================
We create a symlink from ``/usr/local/bin/tljh-config`` to ``/opt/tljh/hub/bin/tljh-cohnfig``, so users
can run ``sudo -E tljh-config <somethihng>`` from their terminal. While the user environment is added
We create a symlink from ``/usr/bin/tljh-config`` to ``/opt/tljh/hub/bin/tljh-cohnfig``, so users
can run ``sudo tljh-config <somethihng>`` from their terminal. While the user environment is added
to users' ``$PATH`` when they launch through JupyterHub, the hub environment is not. This makes it
hard to access the ``tljh-config`` command used to change most config parameters. Hence we symlink the
``tljh-config`` command to ``/usr/local/bin``, so it is directly accessible with ``sudo -E tljh-config <command>``.
``tljh-config`` command to ``/usr/local/bin``, so it is directly accessible with ``sudo tljh-config <command>``.
Systemd Units
=============

View File

@@ -27,7 +27,7 @@ set a particular property with the following command:
.. code-block:: bash
sudo -E tljh-config set <property-path> <value>
sudo tljh-config set <property-path> <value>
where:
@@ -42,7 +42,7 @@ do so with the following:
.. code-block:: bash
sudo -E tljh-config set auth.DummyAuthenticator.password mypassword
sudo tljh-config set auth.DummyAuthenticator.password mypassword
This can only set string and numerical properties, not lists.
@@ -54,7 +54,7 @@ To see the current configuration, you can run the following command:
.. code-block:: bash
sudo -E tljh-config show
sudo tljh-config show
This will print the current configuration of your TLJH. This is very
useful when asking for support!
@@ -67,7 +67,7 @@ it to take effect. You can do so with:
.. code-block:: bash
sudo -E tljh-config reload
sudo tljh-config reload
This should not affect any running users. The JupyterHub will be
restarted and loaded with the new configuration.