Browse code

Fix iso installer: reset root password expiration date to `forever`

Previous method used `chage` with -R, which would fail due to library
versions mismatch between host and chroot.

Change-Id: I841e157b7fefc840e5e9d03dd19e9a618d487f43
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/4709
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Anish Swaminathan <anishs@vmware.com>

Bo Gan authored on 2018/01/30 10:12:37
Showing 1 changed files
... ...
@@ -276,7 +276,7 @@ if [ "$LIVE_CD" = false ] ; then
276 276
 fi
277 277
 
278 278
 # Set password max days to 99999 (disable aging)
279
-chage -R ${BUILDROOT} -M 99999 root
279
+sed -i '/^root.*/root::0:0:99999:7:::' "${BUILDROOT}/etc/shadow"
280 280
 
281 281
 # Generate the intird
282 282
 pushd $BUILDROOT