blob: 4d212126033a265aea9ef86a58a51097d3013833 [file] [log] [blame]
# Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
if [ "$BACKDOOR" -eq "0" ]; then
exit 0
# reset root password to test0000 (4 zeroes).
CRYPTED_PASSWD="$(echo "test0000" | openssl passwd -1 -stdin)"
echo "root:${CRYPTED_PASSWD}:14500:0:::::" > ${TEMP_SHADOWFILE}
echo "chronos:${CRYPTED_PASSWD}:14500:0:99999::::" >> ${TEMP_SHADOWFILE}
sed '/^root/ d;/^chronos/ d' ${ROOT_FS_DIR}/etc/shadow >> ${TEMP_SHADOWFILE}
mv -f ${TEMP_SHADOWFILE} ${ROOT_FS_DIR}/etc/shadow