From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 78E7BE0091D; Mon, 1 Dec 2014 01:43:18 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,HTML_MESSAGE, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, * medium trust * [147.11.146.13 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HTML_MESSAGE BODY: HTML included in message Received: from mail1.windriver.com (mail1.windriver.com [147.11.146.13]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 36C50E0084A for ; Mon, 1 Dec 2014 01:43:08 -0800 (PST) Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail1.windriver.com (8.14.9/8.14.5) with ESMTP id sB19h7HB029425 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL) for ; Mon, 1 Dec 2014 01:43:07 -0800 (PST) Received: from [128.224.162.226] (128.224.162.226) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server (TLS) id 14.3.174.1; Mon, 1 Dec 2014 01:43:06 -0800 Message-ID: <547C383E.6030600@windriver.com> Date: Mon, 1 Dec 2014 17:43:26 +0800 From: ChenQi User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: References: <4009F04F5925CD4C95FBD9BE756381FE02848F2A6B@MSSRVS5.atlas.de> In-Reply-To: <4009F04F5925CD4C95FBD9BE756381FE02848F2A6B@MSSRVS5.atlas.de> X-Originating-IP: [128.224.162.226] Subject: Re: add a user via recipe X-BeenThere: yocto@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Discussion of all things Yocto Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Dec 2014 09:43:18 -0000 Content-Type: multipart/alternative; boundary="------------070909030205040501090604" --------------070909030205040501090604 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 8bit On 12/01/2014 04:46 PM, Matthias.Heise@atlas-elektronik.com wrote: > > Hi there, > > I’m still trying to add a user via recipe. The method with > > inherit extrausers > > EXTRA_USER_PARAMS = "useradd -p > '\$6\$53uYm/0Fnll\$Nc0RbHSvqRrd63Tw98TO3V1n25ORK9oR4QHqRIriXzLy0il/7.LIacX7mz7RJ1tdPIWiCJLNyQa7dKBNURqEg1' > fstuser;" > EXTRA_USERS_PARAMS instead of EXTRA_USER_PARAMS Also, clear password is supported. E.g. EXTRA_USERS_PARAMS = "useradd -P 'hello' tester;" > Does not work (no errors just no user in image), as well as this : > > ROOTFS_POSTPROCESS_COMMAND += "add_a_user;" > > add_a_user(){ > > useradd -p > '\$6\$53uYm/0Fnll\$Nc0RbHSvqRrd63Tw98TO3V1n25ORK9oR4QHqRIriXzLy0il/7.LIacX7mz7RJ1tdPIWiCJLNyQa7dKBNURqEg1' > fstuser; > > } > > Which results in an error during bitbake : > > useradd: /etc/passwd.23966: Permission denied > > useradd cannot lock /etc/passwd; try again later > You need to pass '--root xxx' option to it. //Chen Qi > any ideas to that ? > > thanks, > > regards > > Mat > > > --------------070909030205040501090604 Content-Type: text/html; charset="windows-1252" Content-Transfer-Encoding: 8bit
On 12/01/2014 04:46 PM, Matthias.Heise@atlas-elektronik.com wrote:

Hi there,

 

I’m still trying to add a user via recipe. The method with

 

inherit extrausers

EXTRA_USER_PARAMS = "useradd -p '\$6\$53uYm/0Fnll\$Nc0RbHSvqRrd63Tw98TO3V1n25ORK9oR4QHqRIriXzLy0il/7.LIacX7mz7RJ1tdPIWiCJLNyQa7dKBNURqEg1' fstuser;"

 


EXTRA_USERS_PARAMS instead of EXTRA_USER_PARAMS

Also, clear password is supported. E.g.
EXTRA_USERS_PARAMS = "useradd -P 'hello' tester;"

Does not work (no errors just no user in image), as well as this :

 

ROOTFS_POSTPROCESS_COMMAND += "add_a_user;"

 

add_a_user(){

     useradd -p '\$6\$53uYm/0Fnll\$Nc0RbHSvqRrd63Tw98TO3V1n25ORK9oR4QHqRIriXzLy0il/7.LIacX7mz7RJ1tdPIWiCJLNyQa7dKBNURqEg1' fstuser;

}

 

Which results in an error during bitbake :

useradd: /etc/passwd.23966: Permission denied

useradd cannot lock /etc/passwd; try again later

 


You need to pass '--root xxx' option to it.

//Chen Qi

any ideas to that ?

thanks,

regards

Mat




--------------070909030205040501090604--