ref-manual: Update how to set a useradd password
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi
I am not completely sure of some details on this patch. Any suggestions to make it better, please let me know.
There is a bug [1] and the commit which changed this behavior is [2]
[1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=14605
[2] http://cgit.openembedded.org/openembedded-core/commit/meta/recipes-extended/shadow?id=759df7395908f18b3b68f28d043ac9ebd42dd0c8
Regards,
Daiane
Quoted 55 lines · Daiane Angolini via lists.yoctoproject.org
Partial fix for [YOCTO 14605]
Signed-off-by Daiane Angolini <[email protected]>--- documentation/ref-manual/classes.rst | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)documentation/ref-manual/classes.rst +11
-6@@ -590,19 +590,25 @@ Here is an example that uses this class in an image recipe:: " Here is an example that adds two users named "tester-jim" and "tester-sue" and assigns -passwords:: +passwords. First on host, create the password hash:: + + mkpasswd -m sha512crypt tester01 + +The resultant hash is set to a variable and used in ``useradd`` command parameters. +Remember to escape the character ``$``:: inherit extrausers + PASSWD = "\$6\$kt.uxYMp9O9.Yxqd\$SBaJTucixmPm7/WjFL2CjUGMHTqtw8KPK0yxpYw.tGWWHlnOwkUwZ0Pa6vR724Te/E5./V.wua4HT/h0li8Lw/" EXTRA_USERS_PARAMS = "\ - useradd -P tester01 tester-jim; \ - useradd -P tester01 tester-sue; \ + useradd -p '${PASSWD} tester-jim; \ + useradd -p '${PASSWD} tester-sue; \ " -Finally, here is an example that sets the root password to "1876*18":: +Finally, here is an example that sets the root password:: inherit extrausers EXTRA_USERS_PARAMS = "\ - usermod -P 1876*18 root; \ + usermod -p '${PASSWD} root; \ " .. _ref-classes-features_check: --2.30.2
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#2014): https://lists.yoctoproject.org/g/docs/message/2014
Mute This Topic: https://lists.yoctoproject.org/mt/86470322/5992125
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/docs/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Oi Daiane
Many thanks for the patch!
Quoted 9 lines · Daiane Angolini
Hi
I am not completely sure of some details on this patch. Any suggestions to make it better, please let me know.
There is a bug [1] and the commit which changed this behavior is [2]
[1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=14605
[2] http://cgit.openembedded.org/openembedded-core/commit/meta/recipes-extended/shadow?id=759df7395908f18b3b68f28d043ac9ebd42dd0c8
Your patch looks perfectly good to me. I'm currently testing it. Why do you say that it only partially fixes [YOCTO 14605]?
Thanks again,
Michael.
Signature · 3 lines
Michael Opdenacker, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Quoted 3 lines · Michael Opdenacker
Oi Daiane
Hi Michael
Quoted 8 lines
Many thanks for the patch!
Quoted 5 lines · Daiane Angolini
Hi
I am not completely sure of some details on this patch. Any suggestions to make it better, please let me know.
Quoted 8 lines
Quoted 4 lines
There is a bug [1] and the commit which changed this behavior is [2]
[1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=14605
[2] http://cgit.openembedded.org/openembedded-core/commit/meta/recipes-extended/shadow?id=759df7395908f18b3b68f28d043ac9ebd42dd0c8Your patch looks perfectly good to me. I'm currently testing it. Why do you say that it only partially fixes [YOCTO 14605]?
Because I think something is also needed from the oe-core perspective. Something like this:
https://lists.openembedded.org/g/openembedded-core/message/157090
But I'm still working on it
Thanks for reviewing and testing the patch.
Daiane
Quoted 9 lines
Thanks again,
Michael.--
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com