[meta-freescale] default root password or password request

Uhl, Joe juhl at gai-tronics.com
Tue Nov 18 04:48:52 PST 2014


-----Original Message-----
From: Matthias.Heise at atlas-elektronik.com [mailto:Matthias.Heise at atlas-elektronik.com] 
Sent: Tuesday, November 18, 2014 4:23 AM
To: Uhl, Joe; meta-freescale at yoctoproject.org
Subject: AW: [meta-freescale] default root password or password request

Hi Joe,

thank you very much, the part with the root password is working, also with a different password copied from shadow into the sed-line.
The new user however isn't even added to the users list, any idea what might be wrong/missing here ? 
The same line as in EXTRA_USER_PARAMS copied into the console works btw. so it must be something with the recipe ... 
The recipe looks like this now :


SUMMARY = "A small image just capable of allowing a device to boot."
#IMAGE_INSTALL = "packagegroup-core-boot packagegroup-core-ssh-openssh nano apt ${ROOTFS_PKGMANAGE_BOOTSTRAP} ${CORE_IMAGE_EXTRA_INSTALL}"
IMAGE_INSTALL = "packagegroup-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP} ${CORE_IMAGE_EXTRA_INSTALL}"
IMAGE_INSTALL += " packagegroup-core-ssh-openssh nano"

IMAGE_LINGUAS = " "

LICENSE = "MIT"

inherit core-image

IMAGE_ROOTFS_SIZE ?= "8192"

inherit extrausers
>>>>>>>EXTRA_USER_PARAMS = "useradd -p \$6\$53uYm/0Fnll\$Nc0RbHSvqRrd63Tw98TO3V1n25ORK9oR4QHqRIriXzLy0il/7.LIacX7mz7RJ1tdPIWiCJLNyQa7dKBNURqEg1 fstuser;"
ROOTFS_POSTPROCESS_COMMAND += "set_root_password;"
#'passwd'
set_root_password(){
	sed 's%^root:[^:]*:%root:\$6\$eNiHN/Tv8Cjy\$KT/csSqGxk6skJaaE.oThNgBZN5sYXfwk6Wsc36nxye/rZJoObZBJcDe/0D4xBSm0oQLURk.1JeqQiUY/S4Xk1:%'\
	<${IMAGE_ROOTFS}/etc/shadow \
	>${IMAGE_ROOTFS}/etc/shadow.new;
	mv ${IMAGE_ROOTFS}/etc/shadow.new ${IMAGE_ROOTFS}/etc/shadow; }

-------------------------------------

Try adding single quotes around the encrypted password like this:

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



---------------------------------------------------------------------------------------------------------------------------- 
Confidentiality Requirement: This communication, including any attachment(s), may contain confidential information and is for the sole use of the intended recipient(s). If you are not the intended recipient, you are hereby notified that you have received this communication in error and any unauthorized review, use, disclosure, dissemination, distribution or copying of it or its contents is strictly prohibited.  If you have received this communication in error, please notify the sender immediately by telephone or e-mail and destroy all copies of this communication and any attachments.



More information about the meta-freescale mailing list