[yocto] adding users to image with standalone recipe

Matt Schepers mschepers at telspandata.com
Fri Jan 5 08:34:23 PST 2018


Folks,

I am trying to add users to my rootfs. 


When I add this to the image recipe it works:
---------
ROOT_PASSWORD = "secret"
IGU_PASSWORD =  "secret"

EXTRA_USERS_PARAMS = "\
		    groupadd igu; \
		    useradd -p `openssl passwd ${IGU_PASSWORD}` igu; \
		    useradd -g igu igu; \
		    usermod -p `openssl passwd ${ROOT_PASSWORD}` root; \
		    "
---------


When I create a separate .bb file called 'users.bb' and append 'users' to IMAGE_INSTALL I get a build error:
specifically, 'users.bb' creates two packages 'users-dbg.rpm' and 'users-doc.rpm', but not a 'users.rpm'. The build fails because it cant find a 'users.rpm'

This is my 'users.bb' file:
---------
LICENSE = "CLOSED"

inherit extrausers

ROOT_PASSWORD = "secret"
IGU_PASSWORD =  "secret"

EXTRA_USERS_PARAMS = "\
		    groupadd igu; \
		    useradd -p `openssl passwd ${IGU_PASSWORD}` igu; \
		    useradd -g igu igu; \
		    usermod -p `openssl passwd ${ROOT_PASSWORD}` root; \
		    "
---------


My question is: Why can't this be a separate recipe?






More information about the yocto mailing list