[yocto] add a user via recipe
Matthias.Heise at atlas-elektronik.com
Matthias.Heise at atlas-elektronik.com
Mon Dec 1 04:41:33 PST 2014
Ok, the EXTRA_USERS_PARAMS method now also works, it was the typo with USER and USERS and an encrypted password with ' ' around it which is needed, strangely the encrypted string for one and the same password all of a sudden was different, after re-generating it, it worked
Von: yocto-bounces at yoctoproject.org [mailto:yocto-bounces at yoctoproject.org] Im Auftrag von ChenQi
Gesendet: Montag, 1. Dezember 2014 10:43
An: yocto at yoctoproject.org
Betreff: Re: [yocto] add a user via recipe
On 12/01/2014 04:46 PM, Matthias.Heise at atlas-elektronik.com<mailto:Matthias.Heise at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20141201/6cb4b4c8/attachment.html>
More information about the yocto
mailing list