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

Unified Diff: set_shared_user_password.sh

Issue 6534003: set_shared_user_password.sh updates /etc/shared_user_passwd.txt (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git@master
Patch Set: switch to a file Created 9 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: set_shared_user_password.sh
diff --git a/set_shared_user_password.sh b/set_shared_user_password.sh
index bdc7c44f1a252a37ce8d6e9bfd582a68e222a048..72d0ab06889e6e69313a055f18567b40941b4d5d 100755
--- a/set_shared_user_password.sh
+++ b/set_shared_user_password.sh
@@ -43,10 +43,13 @@ set -e
# Get password
read -p "Enter password for shared user account: " PASSWORD
-CRYPTED_PASSWD_FILE=$SCRIPTS_DIR/shared_user_passwd.txt
CRYPTED_PASSWD="$(echo "$PASSWORD" | openssl passwd -1 -stdin)"
PASSWORD="gone now"
-echo "$CRYPTED_PASSWD" > $CRYPTED_PASSWD_FILE
+CRYPTED_PASSWD_FILE="${SCRIPTS_DIR}/shared_user_passwd.txt"
+echo "${CRYPTED_PASSWD}" > "${CRYPTED_PASSWD_FILE}"
-echo "Shared user password set in $CRYPTED_PASSWD_FILE"
+SHARED_USER_PASSWD_FILE="/etc/shared_user_passwd.txt"
+echo "${CRYPTED_PASSWD}" | sudo_clobber "${SHARED_USER_PASSWD_FILE}"
+
+echo "Password set in ${CRYPTED_PASSWD_FILE} and ${SHARED_USER_PASSWD_FILE}"
« 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