From: Mauro Carvalho Chehab Date: Wed, 15 Jul 2015 11:27:21 +0000 (+0000) Subject: meta-tizen: tizen images: set a default password to root X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fd04b588beab48b4d296f739280f3eca610bb091;p=scm%2Fbb%2Ftizen-distro.git meta-tizen: tizen images: set a default password to root Currently, no users at the image have any password. This is bad, as it doesn't allow ssh into the machine. So, let's set a password for the root user, as "root". Change-Id: I0cbe36211f1fe7cb7cb2d3260f3acc6a0e19ed11 (From meta-tizen rev: f96cf2b3611d4f5b2aa2f16dc9b6dc0bf7cb3047) Signed-off-by: Mauro Carvalho Chehab --- diff --git a/meta-tizen/meta-tizen-common-base/recipes-image/images/tizen-core-image-minimal.bb b/meta-tizen/meta-tizen-common-base/recipes-image/images/tizen-core-image-minimal.bb index 5ae7528..c76980e 100644 --- a/meta-tizen/meta-tizen-common-base/recipes-image/images/tizen-core-image-minimal.bb +++ b/meta-tizen/meta-tizen-common-base/recipes-image/images/tizen-core-image-minimal.bb @@ -53,3 +53,12 @@ CORE_IMAGE_EXTRA_INSTALL += "packagegroup-tizen-fonts-ttf" CORE_IMAGE_EXTRA_INSTALL += "packagegroup-tizen-fonts-pango" export SYSROOT = "${IMAGE_ROOTFS}" + +# Set root password to "root" +ROOTFS_POSTPROCESS_COMMAND += "set_root_passwd;" +set_root_passwd() { + sed 's%^root:[^:]*:%root:wYNffsf6sozwE:%' \ + < ${IMAGE_ROOTFS}/etc/shadow \ + > ${IMAGE_ROOTFS}/etc/shadow.new; + mv ${IMAGE_ROOTFS}/etc/shadow.new ${IMAGE_ROOTFS}/etc/shadow; +}