mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-08 05:26:58 +02:00
15 lines
603 B
Bash
Executable File
15 lines
603 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# 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.
|
|
|
|
# reset root password to test0000 (4 zeroes).
|
|
TEMP_SHADOWFILE=${ROOT_FS_DIR}/etc/newshadow
|
|
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
|
|
|