image.bbclass: Make zap_root_password to disable root's password not the user root...
authorKhem Raj <raj.khem@gmail.com>
Wed, 26 May 2010 11:07:07 +0000 (04:07 -0700)
committerKhem Raj <raj.khem@gmail.com>
Wed, 26 May 2010 16:56:25 +0000 (09:56 -0700)
* With shadow now running pwconv after commit 7c5f81b2139e55622ca2f23ff6b63438d4825d87
  It converts :*: passwd entry into equivalent /etc/shadow entry :*:
  which in shadow means disable the account as per
  http://tldp.org/LDP/lame/LAME/linux-admin-made-easy/shadow-file-formats.html
  As a result root can not login unless one boots into shell and then
  resets the password.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Acked-by: Chris Larson <clarson@kergoth.com>
classes/image.bbclass

index f695d3c..2105195 100644 (file)
@@ -205,7 +205,7 @@ log_check() {
 # can decide if they want it or not
 
 zap_root_password () {
-       sed 's%^root:[^:]*:%root:*:%' < ${IMAGE_ROOTFS}/etc/passwd >${IMAGE_ROOTFS}/etc/passwd.new
+       sed 's%^root:[^:]*:%root::%' < ${IMAGE_ROOTFS}/etc/passwd >${IMAGE_ROOTFS}/etc/passwd.new
        mv ${IMAGE_ROOTFS}/etc/passwd.new ${IMAGE_ROOTFS}/etc/passwd
 }