From cb06dc8ba00727324f9b9688cfa612bbe333996a Mon Sep 17 00:00:00 2001 From: Christian Goll Date: Wed, 15 Feb 2023 09:11:33 +0100 Subject: [PATCH] described syncuser close #680 close #483 --- userdocs/conf.py | 6 +++--- userdocs/contents/containers.rst | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/userdocs/conf.py b/userdocs/conf.py index 573a75e7..3420cbe6 100644 --- a/userdocs/conf.py +++ b/userdocs/conf.py @@ -7,14 +7,14 @@ # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information project = 'Warewulf User Guide' -copyright = '2022, Warewulf Project Contributors' +copyright = '2023, Warewulf Project Contributors' author = 'Warewulf Project Contributors' release = 'development' # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration -extensions = [] +extensions = ['sphinx.ext.autosectionlabel'] templates_path = ['_templates'] exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] @@ -45,4 +45,4 @@ html_context = { html_logo = 'logo.png' html_favicon = 'favicon.png' -html_show_copyright = False \ No newline at end of file +html_show_copyright = False diff --git a/userdocs/contents/containers.rst b/userdocs/contents/containers.rst index 24f1c41b..264a85da 100644 --- a/userdocs/contents/containers.rst +++ b/userdocs/contents/containers.rst @@ -65,6 +65,23 @@ Here is an example: The above is just an example. Consideration should be done before doing it this way if you are in a security sensitive environment or shared environments. You would not want these showing up in bash history or logs. +Syncuser +-------- + +At import time warewulf checks if the names of the users on the host matches the users and UIDS/GIDS in the imported container, if there is mismatch, the import command will print out a warning. +By setting the ``--syncuser`` flag you advice warewulf to try to syncronize the users from the host to the container, which means that ``/etc/passwd`` and ``/etc/group`` of the imported container are updated and all the files belonning to these UIDs and GIDs will also be updated. + +A check if the users of the host and container matches can be triggered with the +..code-block:: bash + + wwctl container syncuser container-name + +command. With the ``--write`` flag it will update the container to match the user database of the host as described above. + +Exclude +------- + + Listing All Imported Containers =============================== @@ -104,6 +121,8 @@ You can also ``--bind`` directories from your host into the container when using When the command completes, if anything within the container changed, the container will be rebuilt into a bootable static object automatically. +If the files ``/etc/passwd`` or ``/etc/group`` where updated, there will be an additional check if the users are in sync as described in Syncuser section. + Creating Containers From Scratch ================================