0

I am trying to add a recipe to PetaLinux which only runs commands, adding new users. Aside from the pre-amble SUMMARY, LICENCE etc here is what I have:

inherit extrausers

EXTRA_USERS_PARAMS = "\
  useradd -P newuser newuser; \
  "

ALLOW_EMPTY_${PN} = "1"

This recipe is in recipes-apps, and it is enabled in petalinux-config -c rootfs The petalinux image builds and boots fine, but the new user is not created.

Is this the correct way to add recipes which don't add files? If not, what is the correct way of adding recipes like this?

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
uhsl_m
  • 322
  • 3
  • 11

1 Answers1

0

Use a lowercase p and supply an encrypted password.

Get the encrypted password by running openssl passwd <yourpassword> on the command line:

~# openssl passwd newuser
o3ZhCFw5jSioM

Then add to your recipe:

useradd -p 'o3ZhCFw5jSioM' newuser
thelummox
  • 336
  • 2
  • 8