Re: Adding and using user in more than one recipe

Khem Raj

On Fri, Jul 22, 2022 at 5:23 PM Greg Wilson-Lindberg
<gwilson@...> wrote:

Hello list,

I’m trying to understand how the extrauser and adduser packages are used and interact in kirkstone.

I need to add a user and I would like to also use this user in another recipe. This had been working in our previous builds using version of Yocto up to hardnot. We are in the process of updating to kirkstone and the user stuff has now broken and I am not making any sense out of the documentation.

How do I create a user in one recipe and then use that user in another recipe? Can I even do that, or do I need to create the user in more than one recipe with a hard coded UID, GID?

you can do it in image recipe

inherit extrausers

IMAGE_FEATURES:remove = "debug-tweaks"

useradd scribbledeedoo; \
usermod -p '$(openssl passwd -6 diddleDoo5)' scribbledeedoo; \
usermod -a -G adm scribbledeedoo; \
usermod -a -G video scribbledeedoo; \
usermod -a -G audio scribbledeedoo; \
usermod -a -G systemd-journal scribbledeedoo; \




Greg Wilson-LIndberg

Join to automatically receive all group messages.