Skip to contentSkip to conversation

ref-manual: correct description of empty-root-passwd in IMAGE_FEATURES

PATCH In review [email protected] 2 participants 2 messages Jun 15, 2022 – Jul 4, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ref-manual: correct description of empty-root-passwd in IMAGE_FEATURES

From: Michael Opdenacker <[email protected]>

"empty-root-passwd" doesn't actually set an empty root password. It just doesn't touch the initial root password which is empty by default.

---
 documentation/ref-manual/features.rst | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)
documentation/ref-manual/features.rst +13 -2
index f7abb417ba..76bb3bceac 100644
@@ -216,8 +216,19 @@ Here are the image features available for all images:
 -  *doc-pkgs:* Installs documentation packages for all packages
    installed in a given image.
 
--  *empty-root-password:* Sets the root password to an empty string,
-   which allows logins with a blank password.
+-  *empty-root-password:* This feature or ``debug-tweaks`` is required if
+   you want to allow root login with an empty password. If these features
+   are not present in :term:`IMAGE_FEATURES`, a non-empty password is
+   forced in ``/etc/passwd`` and ``/etc/shadow`` if such files exist.
+
+   .. note::
+       ``empty-root-passwd`` doesn't set an empty root password by itself.
+       You get an initial empty root password thanks to the
+       :oe_git:`base-passwd </openembedded-core/tree/meta/recipes-core/base-passwd/>`
+       and :oe_git:`shadow </openembedded-core/tree/meta/recipes-extended/shadow/>`
+       recipes, and the presence of ``empty-root-passwd`` or ``debug-tweaks``
+       just disables the mechanism which forces an non-empty password for the
+       root user.
 
 -  *overlayfs-etc:* Configures the ``/etc`` directory to be in ``overlayfs``.
    This allows to store device specific information elsewhere, especially
Signature · 1 line
2.34.1
#1 lore raw

Hi Michael,

Quoted 5 lines · Michael Opdenacker via lists.yoctoproject.org

From: Michael Opdenacker <[email protected]>

"empty-root-passwd" doesn't actually set an empty root password. It just doesn't touch the initial root password which is empty by default.

I'm not sure we should care about the implementation details in the docs.

Quoted 10 lines
---
  documentation/ref-manual/features.rst | 15 +++++++++++++--
  1 file changed, 13 insertions(+), 2 deletions(-)
documentation/ref-manual/features.rst +0 -0
index f7abb417ba..76bb3bceac 100644

documentation/ref-manual/features.rst Here are the image features available for all images: · line 223

Quoted 10 lines
documentation/ref-manual/features.rst +5 -2
@@ -216,8 +216,19 @@ Here are the image features available for all images:
  -  *doc-pkgs:* Installs documentation packages for all packages
     installed in a given image.
 
--  *empty-root-password:* Sets the root password to an empty string,
-   which allows logins with a blank password.
+-  *empty-root-password:* This feature or ``debug-tweaks`` is required if
+   you want to allow root login with an empty password. If these features
+   are not present in :term:`IMAGE_FEATURES`, a non-empty password is
+   forced in ``/etc/passwd`` and ``/etc/shadow`` if such files exist.
+

I guess the two important pieces of information there are:
- debug-tweaks enables empty-root-password? Can we add this info to
debug-tweaks paragraph/section?
- if neither are set, a random password is generated during build for
the root user?

documentation/ref-manual/features.rst Here are the image features available for all images: · line 232

Quoted 9 lines
documentation/ref-manual/features.rst +8 -0
+   .. note::
+       ``empty-root-passwd`` doesn't set an empty root password by itself.
+       You get an initial empty root password thanks to the
+       :oe_git:`base-passwd </openembedded-core/tree/meta/recipes-core/base-passwd/>`
+       and :oe_git:`shadow </openembedded-core/tree/meta/recipes-extended/shadow/>`
+       recipes, and the presence of ``empty-root-passwd`` or ``debug-tweaks``
+       just disables the mechanism which forces an non-empty password for the
+       root user.
 

I'm not sure this kind of information has its place in the docs?

Cheers,
Quentin