[yocto] [bitbake-devel] Add custom user to custom group in bitbake recipe

Khem Raj raj.khem at gmail.com
Fri Mar 2 18:30:51 PST 2018


On 3/2/18 3:36 AM, Parthiban Nallathambi wrote:
> Hello All,
> 
> I have created a custom group e.g "grp1" in my application recipe say
> "app.bb".
> 
> GROUPADD_PARAM_${PN} = "grp1"
> 
> I am trying to add my custom user e.g: "user1" to this group "grp1" in
> "space.bb".
> 
> USERADD_PARAM_${PN} = "-d ${localstatedir}/lib/space/ -s /bin/false -G
> grp1 -U user1"
> 
> The useradd command failed: "useradd: group 'grp1' does not exist". I
> have also tried adding DEPENDS_${PN} = "app" in space.bb, but it doesn't
> help.

ensure that the package adding group is also part of final image. For
that you might use something like

RDEPENDS_${PN} += "app"

in the recipe which is adding the user

> 
> How can I add my custom user to my custom group in bitbake recipe?
> 
> Question in Stackoverflow:
> https://stackoverflow.com/questions/49068076/yocto-add-custom-user-to-custom-group
> 
> 




More information about the yocto mailing list