Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(562)

Side by Side Diff: src/scripts/mod_for_test_scripts/300changePassword

Issue 1021005: A typerr in the change password script caused lost of root password in test image. (Closed)
Patch Set: Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 2
3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. 3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 # reset root password to test0000 (4 zeroes). 7 # reset root password to test0000 (4 zeroes).
8 TEMP_SHADOWFILE=${ROOT_FS_DIR}/etc/newshadow 8 TEMP_SHADOWFILE=${ROOT_FS_DIR}/etc/newshadow
9 CRYPTED_PASSWD="$(echo "test0000" | openssl passwd -1 -stdin)" 9 CRYPTED_PASSWD="$(echo "test0000" | openssl passwd -1 -stdin)"
10 echo "root:${CRYPTED_PASSWD}:14500:0:::::" > ${TEMP_SHADOWFILE} 10 echo "root:${CRYPTED_PASSWD}:14500:0:::::" > ${TEMP_SHADOWFILE}
11 echo "chronos:${CRYPTED_PASSWD}:14500:0:99999::::" > ${TEMP_SHADOWFILE} 11 echo "chronos:${CRYPTED_PASSWD}:14500:0:99999::::" >> ${TEMP_SHADOWFILE}
12 sed '/^root/ d;/^chronos/ d' ${ROOT_FS_DIR}/etc/shadow >> ${TEMP_SHADOWFILE} 12 sed '/^root/ d;/^chronos/ d' ${ROOT_FS_DIR}/etc/shadow >> ${TEMP_SHADOWFILE}
13 mv -f ${TEMP_SHADOWFILE} ${ROOT_FS_DIR}/etc/shadow 13 mv -f ${TEMP_SHADOWFILE} ${ROOT_FS_DIR}/etc/shadow
14 14
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698