[yocto] How to add user with nologin shell

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


Hi,

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.

Thanks,
Abhinav

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

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
--
_______________________________________________
yocto mailing list
yocto at yoctoproject.org
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.yoctoproject.org_listinfo_yocto&d=DQIGaQ&c=BFpWQw8bsuKpl1SgiZH64Q&r=geJ1wB7xRIMmteYB2Fo8esL32BOWvwP1HmY0YuLEB4E&m=sR9QTHBLoNC-ypErmIN_NOajUJyBVe5kWfwE32I43Lk&s=V6K3KI5p4m71vEg5maFLO2bQc4Uymrj_t1oh5H466Eg&e= 


More information about the yocto mailing list