Commit 23f62254 authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Fix a bug in ChagePassword task

In some cases the task removed some shadow/master.passwd entries by
accident because the grep pattern it used was more general than it
should be
parent ce86d6c7
......@@ -142,7 +142,7 @@ unix_password() {
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"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment