diff options
author | John Klug <john.klug@multitech.com> | 2017-04-21 10:35:44 -0500 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2017-05-23 15:22:10 -0500 |
commit | 00ce6692fd0287c15b7f6e5aa25fa66eb2221971 (patch) | |
tree | bc86a0166540bc2d16fe720df226a1201e9ae58a /classes/mlinux-image.bbclass | |
parent | df5312a5710020377380fd4e5b0e971366edc319 (diff) | |
download | meta-mlinux-00ce6692fd0287c15b7f6e5aa25fa66eb2221971.tar.gz meta-mlinux-00ce6692fd0287c15b7f6e5aa25fa66eb2221971.tar.bz2 meta-mlinux-00ce6692fd0287c15b7f6e5aa25fa66eb2221971.zip |
mtadm user, root password removed, sudo
Diffstat (limited to 'classes/mlinux-image.bbclass')
-rw-r--r-- | classes/mlinux-image.bbclass | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/classes/mlinux-image.bbclass b/classes/mlinux-image.bbclass index 785160e..3c3bcaa 100644 --- a/classes/mlinux-image.bbclass +++ b/classes/mlinux-image.bbclass @@ -2,12 +2,14 @@ # having file mod times of zero confuses cron IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 ${EXTRA_IMAGECMD}" -# set specified root password in image using ROOT_PASSWORD_HASH +# set specified mtadm password in image using ROOT_PASSWORD_HASH mlinux_set_root_password () { + echo IMAGE_ROOTFS is ${IMAGE_ROOTFS} >/tmp/m_set_root_pwd.txt + ls ${IMAGE_ROOTFS} >/tmp/ls_pwd.txt if [ -e ${IMAGE_ROOTFS}/etc/shadow ]; then - sed -i 's%^root:[^:]*:%root:${ROOT_PASSWORD_HASH}:%' ${IMAGE_ROOTFS}/etc/shadow + sed -i 's%^mtadm:[^:]*:%mtadm:${ROOT_PASSWORD_HASH}:%' ${IMAGE_ROOTFS}/etc/shadow elif [ -e ${IMAGE_ROOTFS}/etc/passwd ]; then - sed -i 's%^root:[^:]*:%root:${ROOT_PASSWORD_HASH}:%' ${IMAGE_ROOTFS}/etc/passwd + sed -i 's%^mtadm:[^:]*:%mtadm:${ROOT_PASSWORD_HASH}:%' ${IMAGE_ROOTFS}/etc/passwd fi } ROOTFS_POSTPROCESS_COMMAND += "mlinux_set_root_password;" |