Patchwork [3/3] useradd-example: add example for setting clear text password

login
register
mail settings
Submitter Qi.Chen@windriver.com
Date Dec. 10, 2013, 9:58 a.m.
Message ID <4d86e99ba53c5a04019a1f51c251899c98ad47a5.1386669285.git.Qi.Chen@windriver.com>
Download mbox | patch
Permalink /patch/63123/
State Accepted
Commit 36fe775672d66e3d83575eb532eb6ab5109343b4
Headers show

Comments

Qi.Chen@windriver.com - Dec. 10, 2013, 9:58 a.m.
From: Chen Qi <Qi.Chen@windriver.com>

Use '-P' option for user3 to set a clear text password. This is supposed
to serve as an example of how to set clear text password in recipes.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 .../recipes-skeleton/useradd/useradd-example.bb    |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch

diff --git a/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb b/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb
index 53d2340..2f8d9b0 100644
--- a/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb
+++ b/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb
@@ -32,7 +32,8 @@  USERADD_PACKAGES = "${PN} ${PN}-user3"
 USERADD_PARAM_${PN} = "-u 1200 -d /home/user1 -r -s /bin/bash user1; -u 1201 -d /home/user2 -r -s /bin/bash user2"
 
 # user3 will be managed in the useradd-example-user3 pacakge:
-USERADD_PARAM_${PN}-user3 = "-u 1202 -d /home/user3 -r -s /bin/bash user3"
+# As an example, we use the -P option to set clear text password for user3
+USERADD_PARAM_${PN}-user3 = "-u 1202 -d /home/user3 -r -s /bin/bash -P 'user3' user3"
 
 # GROUPADD_PARAM works the same way, which you set to the options
 # you'd normally pass to the groupadd command. This will create