uhsl_m
uhsl_m

Reputation: 342

Custom recipe that doesn't add any files

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?

Upvotes: 0

Views: 267

Answers (1)

thelummox
thelummox

Reputation: 356

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

Upvotes: 0

Related Questions