projects
/
snf-image
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix a bug in ChagePassword task
[snf-image]
/
snf-image-helper
/
tasks
/
50ChangePassword.in
diff --git
a/snf-image-helper/tasks/50ChangePassword.in
b/snf-image-helper/tasks/50ChangePassword.in
index
3f7616c
..
5d01667
100644
(file)
--- a/
snf-image-helper/tasks/50ChangePassword.in
+++ b/
snf-image-helper/tasks/50ChangePassword.in
@@
-142,7
+142,7
@@
unix_password() {
fi
new_entry="$(${flavor}_change_shadow_entry "$entry" "$encrypted")"
fi
new_entry="$(${flavor}_change_shadow_entry "$entry" "$encrypted")"
- grep -v "${users[$i]}" "$target${!shadow}" > "$tmp_shadow"
+ grep -v "^${users[$i]}:" "$target${!shadow}" > "$tmp_shadow"
echo "$new_entry" >> "$tmp_shadow"
cat "$tmp_shadow" > "$target${!shadow}"
echo "done"
echo "$new_entry" >> "$tmp_shadow"
cat "$tmp_shadow" > "$target${!shadow}"
echo "done"