aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/image.bbclass
diff options
context:
space:
mode:
authorSaul Wold <sgw@linux.intel.com>2012-09-07 15:18:36 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-09-10 12:09:14 +0100
commit13e6aa8bba6ab1ebba1efa23f94af379a8fcb6a9 (patch)
treef1332c49c2de14598f49f6f4363a0a030c6e590d /meta/classes/image.bbclass
parent73d02f6b121c8b0ed2d42de0bfd6c227fd4de41f (diff)
downloadopenembedded-core-contrib-13e6aa8bba6ab1ebba1efa23f94af379a8fcb6a9.tar.gz
core-image: allow root login when debug-tweaks is enabled
This allows root to login over ssh with an empty password just like dropbear when the debug-tweaks are enabled, it's important to disable debug-tweaks for a production system as this will leave open a security hole! Thanks to Marc for the settings. Cc: Marc Ferland <marc.ferland@gmail.com> [Yocto #3078] Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/classes/image.bbclass')
-rw-r--r--meta/classes/image.bbclass1
1 files changed, 1 insertions, 0 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 2e95556011..9af67e7384 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -369,6 +369,7 @@ zap_root_password () {
# allow openssh accept login with empty password string
openssh_allow_empty_password () {
if [ -e ${IMAGE_ROOTFS}${sysconfdir}/ssh/sshd_config ]; then
+ sed -i 's#.*PermitRootLogin.*#PermitRootLogin yes#' ${IMAGE_ROOTFS}${sysconfdir}/ssh/sshd_config
sed -i 's#.*PermitEmptyPasswords.*#PermitEmptyPasswords yes#' ${IMAGE_ROOTFS}${sysconfdir}/ssh/sshd_config
fi
}