Hi,

I’m attempting to create a few service users for our software products. 
Initially I had inherited useradd in each recipe that required the user, then 
had a corresponding user added from within the image recipe. I know this is not 
ideal, however I have been unable to solve some issues I’m having so I’m hoping 
someone can help.

I'm on Dunfell branch.

I now have a recipe that creates two users, that all other recipes DEPENDS on. 
Here is the contents of that recipe (adh-user-add.bb):

FILESEXTRAPATHS_prepend := "${THISDIR}:"

SUMMARY = "Add adh and adhX user for other recipes"

LICENSE="CLOSED"

PV = "${ADH_ADH_SVN_REVISION}"

require require/revisions.inc

PACKAGE_ARCH = "${MACHINE_ARCH}"

inherit useradd

USERADD_PACKAGES = "${PN}"

USERADD_PARAM_${PN} = "--system --uid 420 -g adh adh; --system --uid 421 -g 
adhX adhX "

GROUPADD_PARAM_${PN} = "-g 420 adh; -g 421 adhX "

Each recipe that needs these users simply DEPENDS on it from within its own 
recipe. I understand that is the preferred way of doing this?

However, inside my image (development-image.bb) once its built, my /etc/passwd 
file does not contain these users at all. I have tried the following things:

* IMAGE_INSTALL_append += “ adh-user-add”
* DEPENDS += “ adh-user-add”
* RDEPENDS += “ adh-user-add”

Each time I get a passwd file inside of adh-user-add/recipe-sysroots and 
development-image/recipe-sysroots that contains both users, however the passwd 
file on the device is missing those users entirely.

My image recipe looks like this:

SUMMARY = "Development image"

inherit core-image extrausers

require require/revisions.inc

PV = "${CUBE_IMAGE_VERSION}"

PR = "${CUBE_IMAGE_REVISION}"

IMAGE_FSTYPES_append += "wic wic.xz"

WKS_FILE = "sgc30cube.wks"

IMAGE_INSTALL = "packagegroup-core-boot ${CORE_IMAGE_EXTRA_INSTALL} "

IMAGE_INSTALL_append = " \

*** packages removed ***

"

IMAGE_FEATURES_append = " ssh-server-dropbear"

MACHINE_FEATURES_remove = "kernel26 nc screen ext2 alsa gpu touchscreen 
qemu-usermode"

DEPENDS += "adh-user-add"

IMAGE_FEATURES_append = " debug-tweaks"

I feel like I'm going crazy trying to figure this out. I wish I could figure 
out how the final passwd file is generated. I've looked in some logs that I've 
seen suggested online, but have been unable to ascertain if there are any 
errors occurring.

Any help would be greatly appreciated,

Thanks,

Taylor W
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#55380): https://lists.yoctoproject.org/g/yocto/message/55380
Mute This Topic: https://lists.yoctoproject.org/mt/87230851/21656
Mute #dunfell:https://lists.yoctoproject.org/g/yocto/mutehashtag/dunfell
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to