summaryrefslogtreecommitdiffstats
path: root/meta/classes/image.bbclass
diff options
context:
space:
mode:
authorLianhao Lu <lianhao.lu@intel.com>2012-06-11 16:51:51 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-06-28 16:26:42 +0100
commit41ed2e653237e70e73be233af7e2d0a34eb96fe5 (patch)
treedb3c6a445de358b56f3af1851876c082248eebbe /meta/classes/image.bbclass
parent2fa7732840c9d70303650c61a437f6b02e1984a6 (diff)
downloadpoky-41ed2e653237e70e73be233af7e2d0a34eb96fe5.tar.gz
classes/image: Allow openssh empty passwords login.
Allow empty passwords login so that the default root user can login in through openssh. (From OE-Core rev: 39ef0a705ca059f9a7c68aa1710c81411fb7c762) Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/image.bbclass')
-rw-r--r--meta/classes/image.bbclass7
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index fb932b9d66..0772363f18 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -318,6 +318,13 @@ zap_root_password () {
318 mv ${IMAGE_ROOTFS}/etc/passwd.new ${IMAGE_ROOTFS}/etc/passwd 318 mv ${IMAGE_ROOTFS}/etc/passwd.new ${IMAGE_ROOTFS}/etc/passwd
319} 319}
320 320
321# allow openssh accept login with empty password string
322openssh_allow_empty_password () {
323 if [ -e ${IMAGE_ROOTFS}${sysconfdir}/ssh/sshd_config ]; then
324 sed -i 's#.*PermitEmptyPasswords.*#PermitEmptyPasswords yes#' ${IMAGE_ROOTFS}${sysconfdir}/ssh/sshd_config
325 fi
326}
327
321# Turn any symbolic /sbin/init link into a file 328# Turn any symbolic /sbin/init link into a file
322remove_init_link () { 329remove_init_link () {
323 if [ -h ${IMAGE_ROOTFS}/sbin/init ]; then 330 if [ -h ${IMAGE_ROOTFS}/sbin/init ]; then