set_chronos_password.sh: Add missing sudo while grepping the contents of shadow on root fs.

BUG=none
TEST=manual

Change-Id: Ie0d237c0dc6a2c45ffc33b2fcc22279127854ed9

Review URL: http://codereview.chromium.org/3146025
This commit is contained in:
Gaurav Shah
2010-08-20 12:28:14 -07:00
parent 793e1b4156
commit 8c762cb2cf

View File

@@ -19,7 +19,7 @@ change_chronos_password() {
local temp_shadow="$rootfs/etc/tempshadow"
echo "chronos:$crypted_password:14500:0:99999::::" \
| sudo tee "$temp_shadow" > /dev/null
grep -Ev ^chronos: "$rootfs/etc/shadow" \
sudo grep -Ev ^chronos: "$rootfs/etc/shadow" \
| sudo tee -a "$temp_shadow" > /dev/null
sudo mv -f "$temp_shadow" "$rootfs/etc/shadow"
}