From 627740906020fbf209ce9608c0aa7b0e251f5379 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 30 Jun 2008 14:03:11 -0700 Subject: Handle multiple slashes in passwd mkpasswd can generate passwd with multiple slashes that need to be escaped. --- scripts/install-system | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/install-system b/scripts/install-system index 71233ccb..defca8fb 100755 --- a/scripts/install-system +++ b/scripts/install-system @@ -553,7 +553,7 @@ change_password() { local user=$1 local pwd read pwd - local epwd=$(mkpasswd -H md5 $pwd | sed 's:/:\\/':) + local epwd=$(mkpasswd -H md5 $pwd | sed 's:/:\\/:g') sed -i \ -e "/ user $user {/,/}/s/encrypted-password:.*\$/encrypted-password: \"$epwd\"/" \ -- cgit v1.2.3