From: Chen Qi <qi.c...@windriver.com> This function replaces the root password with '*' if 'debug-tweaks' is not in IMAGE_FEATURES. As a result, if we don't have 'debug-tweaks', we would be locked out of the system. That means, if the user uses a bbappend file for base-passwd to set the root password, he would not be able to login as root; if the user uses 'EXTRA_USERS_PARAMS' to set the root password, he would still not be able to login as root.
In a word, this function should be removed to make things work correctly. Signed-off-by: Chen Qi <qi.c...@windriver.com> --- meta/classes/core-image.bbclass | 3 --- meta/classes/image.bbclass | 9 +-------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/meta/classes/core-image.bbclass b/meta/classes/core-image.bbclass index e7c34e2..5ee0d6d 100644 --- a/meta/classes/core-image.bbclass +++ b/meta/classes/core-image.bbclass @@ -73,8 +73,5 @@ inherit image # Create /etc/timestamp during image construction to give a reasonably sane default time setting ROOTFS_POSTPROCESS_COMMAND += "rootfs_update_timestamp ; " -# Zap the root password if debug-tweaks feature is not enabled -ROOTFS_POSTPROCESS_COMMAND += '${@base_contains("IMAGE_FEATURES", "debug-tweaks", "", "zap_root_password ; ",d)}' - # Tweak the mount options for rootfs in /etc/fstab if read-only-rootfs is enabled ROOTFS_POSTPROCESS_COMMAND += '${@base_contains("IMAGE_FEATURES", "read-only-rootfs", "read_only_rootfs_hook; ", "",d)}' diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 168f283..a5ef244 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass @@ -562,13 +562,6 @@ rootfs_uninstall_unneeded () { fi } -# set '*' as the root password so the images -# can decide if they want it or not -zap_root_password () { - sed 's%^root:[^:]*:%root:*:%' < ${IMAGE_ROOTFS}/etc/passwd >${IMAGE_ROOTFS}/etc/passwd.new - mv ${IMAGE_ROOTFS}/etc/passwd.new ${IMAGE_ROOTFS}/etc/passwd -} - # allow dropbear/openssh to accept root logins and logins from accounts with an empty password string ssh_allow_empty_password () { if [ -e ${IMAGE_ROOTFS}${sysconfdir}/ssh/sshd_config ]; then @@ -648,7 +641,7 @@ rootfs_sysroot_relativelinks () { sysroot-relativelinks.py ${SDK_OUTPUT}/${SDKTARGETSYSROOT} } -EXPORT_FUNCTIONS zap_root_password remove_init_link do_rootfs make_zimage_symlink_relative set_image_autologin rootfs_update_timestamp rootfs_no_x_startup +EXPORT_FUNCTIONS remove_init_link do_rootfs make_zimage_symlink_relative set_image_autologin rootfs_update_timestamp rootfs_no_x_startup do_fetch[noexec] = "1" do_unpack[noexec] = "1" -- 1.7.9.5 _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core