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

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

Issue 845007: Change mod_for_test_script to make it work with arm os image. (Closed)
Patch Set: patch 6. 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
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 password for root and shared user account. 7 # reset root password to test0000 (4 zeroes).
8 TEMP_SHADOWFILE=${ROOT_FS_DIR}/etc/newshadow
9 CRYPTED_PASSWD="$(echo "test0000" | openssl passwd -1 -stdin)"
10 echo "root:${CRYPTED_PASSWD}:14500:0:::::" > ${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}
13 mv -f ${TEMP_SHADOWFILE} ${ROOT_FS_DIR}/etc/shadow
8 14
9 LOCAL_ACCOUNT="chronos"
10 echo "Reset password for root."
11 passwd root < test_account.passwd 2> /dev/null
12 echo "Reset password for ${LOCAL_ACCOUNT}."
13 passwd ${LOCAL_ACCOUNT} < test_account.passwd 2> /dev/null
14
OLDNEW
« no previous file with comments | « src/scripts/mod_for_test_scripts/000recordRootFsSize ('k') | src/scripts/mod_for_test_scripts/350addTestAuthKeys » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698