-
Notifications
You must be signed in to change notification settings - Fork 708
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12868 from mpurg/ubuntu_pamunix_useauthtok
Improve OVAL and tests for accounts_password_pam_unix_authtok
- Loading branch information
Showing
3 changed files
with
100 additions
and
15 deletions.
There are no files selected for viewing
44 changes: 29 additions & 15 deletions
44
...unts-pam/locking_out_password_attempts/accounts_password_pam_unix_authtok/oval/shared.xml
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
38 changes: 38 additions & 0 deletions
38
...password_attempts/accounts_password_pam_unix_authtok/tests/ubuntu_commented_value.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,38 @@ | ||
#!/bin/bash | ||
# platform = multi_platform_ubuntu | ||
|
||
source ubuntu_common.sh | ||
|
||
config_file=/usr/share/pam-configs/tmpunix | ||
|
||
# lower priority to ensure the config is below the cac_test_echo | ||
# on the stack, thus using the "Password:" configuration | ||
cat << EOF > "$config_file" | ||
Name: Unix authentication | ||
Default: yes | ||
Priority: 1024 | ||
Conflicts: unix | ||
Auth-Type: Primary | ||
Auth: | ||
[success=end default=ignore] pam_unix.so try_first_pass | ||
Auth-Initial: | ||
[success=end default=ignore] pam_unix.so | ||
Account-Type: Primary | ||
Account: | ||
[success=end new_authtok_reqd=done default=ignore] pam_unix.so | ||
Account-Initial: | ||
[success=end new_authtok_reqd=done default=ignore] pam_unix.so | ||
Session-Type: Additional | ||
Session: | ||
required pam_unix.so | ||
Session-Initial: | ||
required pam_unix.so | ||
Password-Type: Primary | ||
Password: | ||
[success=end default=ignore] pam_unix.so obscure try_first_pass yescrypt # use_authtok | ||
Password-Initial: | ||
[success=end default=ignore] pam_unix.so obscure yescrypt | ||
EOF | ||
|
||
DEBIAN_FRONTEND=noninteractive pam-auth-update | ||
rm "$config_file" |
33 changes: 33 additions & 0 deletions
33
...assword_attempts/accounts_password_pam_unix_authtok/tests/ubuntu_missing_pam_unix.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,33 @@ | ||
#!/bin/bash | ||
# platform = multi_platform_ubuntu | ||
|
||
source ubuntu_common.sh | ||
|
||
config_file=/usr/share/pam-configs/tmpunix | ||
|
||
# lower priority to ensure the config is below the cac_test_echo | ||
# on the stack, thus using the "Password:" configuration | ||
cat << EOF > "$config_file" | ||
Name: Unix authentication | ||
Default: yes | ||
Priority: 1024 | ||
Conflicts: unix | ||
Auth-Type: Primary | ||
Auth: | ||
[success=end default=ignore] pam_unix.so try_first_pass | ||
Auth-Initial: | ||
[success=end default=ignore] pam_unix.so | ||
Account-Type: Primary | ||
Account: | ||
[success=end new_authtok_reqd=done default=ignore] pam_unix.so | ||
Account-Initial: | ||
[success=end new_authtok_reqd=done default=ignore] pam_unix.so | ||
Session-Type: Additional | ||
Session: | ||
required pam_unix.so | ||
Session-Initial: | ||
required pam_unix.so | ||
EOF | ||
|
||
DEBIAN_FRONTEND=noninteractive pam-auth-update | ||
rm "$config_file" |