[yocto] How to add user with nologin shell

Bipnesh, Abhinav (Abhinav) abhinavbipnesh at avaya.com
Thu Nov 24 04:36:40 PST 2016


Still same error even if I used -U option.

I tried even groupadd but still I get below error.

So any thoughts to fix it.


-----Original Message-----
From: yocto-bounces at yoctoproject.org [mailto:yocto-bounces at yoctoproject.org] On Behalf Of Michel D'HOOGE
Sent: Thursday, November 24, 2016 15:52
To: yocto at yoctoproject.org
Subject: Re: [yocto] How to add user with nologin shell


> 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?

yocto mailing list
yocto at yoctoproject.org

More information about the yocto mailing list