-
Notifications
You must be signed in to change notification settings - Fork 706
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fa1349e
commit 5419376
Showing
4 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
...shing_algorithm/set_password_hashing_algorithm_logindefs/tests/default_multivalue.fail.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
# variables = var_password_hashing_algorithm=good_value1|good_value2 | ||
|
||
if grep -q "^ENCRYPT_METHOD" /etc/login.defs; then | ||
sed -i "s/^ENCRYPT_METHOD\b.*/ENCRYPT_METHOD wrong_value/" /etc/login.defs | ||
else | ||
echo "ENCRYPT_METHOD wrong_value" >> /etc/login.defs | ||
fi |
8 changes: 8 additions & 0 deletions
8
...shing_algorithm/set_password_hashing_algorithm_logindefs/tests/default_multivalue.pass.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
# variables = var_password_hashing_algorithm=good_value1|good_value2 | ||
|
||
if grep -q "^ENCRYPT_METHOD" /etc/login.defs; then | ||
sed -i "s/^ENCRYPT_METHOD\b.*/ENCRYPT_METHOD good_value2/" /etc/login.defs | ||
else | ||
echo "ENCRYPT_METHOD good_value2" >> /etc/login.defs | ||
fi |
8 changes: 8 additions & 0 deletions
8
...hing_algorithm/set_password_hashing_algorithm_logindefs/tests/default_multivalue2.pass.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
# variables = var_password_hashing_algorithm=good_value1|good_value2 | ||
|
||
if grep -q "^ENCRYPT_METHOD" /etc/login.defs; then | ||
sed -i "s/^ENCRYPT_METHOD\b.*/ENCRYPT_METHOD good_value1/" /etc/login.defs | ||
else | ||
echo "ENCRYPT_METHOD good_value1" >> /etc/login.defs | ||
fi |
9 changes: 9 additions & 0 deletions
9
..._hashing_algorithm/set_password_hashing_algorithm_logindefs/tests/default_partial.fail.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
# variables = var_password_hashing_algorithm=value1|value2 | ||
|
||
# test that partial match fails | ||
if grep -q "^ENCRYPT_METHOD" /etc/login.defs; then | ||
sed -i "s/^ENCRYPT_METHOD\b.*/ENCRYPT_METHOD value/" /etc/login.defs | ||
else | ||
echo "ENCRYPT_METHOD value" >> /etc/login.defs | ||
fi |