[yocto] How to add user with nologin shell

Michel D'HOOGE michel.dhooge at free.fr
Thu Nov 24 02:22:26 PST 2016


Hi, 

> From: "Abhinav Bipnesh (Abhinav)" <abhinavbipnesh at avaya.com>
> Sent: Thursday, 24 November, 2016 11:05:59 AM

> I am trying to add an user to image with /sbin/nologin but it fails
> with below error


> ERROR: Function failed: set_user_group (log file is located at
> /home/abhinav/bitbake/…/test-image/1.0-r0/temp/log.do_rootfs.54725)

The problem seems to be with the group.
According to my man page, the group must already exist.

> I am using below section in my recipe to achieve it
> EXTRA_USERS_PARAMS = “useradd -M -g user1 user1 -r -s /sbin/nologin;”

Why don't you use the -U flag?

Michel



More information about the yocto mailing list