Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Password-Initial:
[success=end default=ignore] pam_unix.so obscure yescrypt
EOF

DEBIAN_FRONTEND=noninteractive pam-auth-update --enable tmp_unix
DEBIAN_FRONTEND=noninteractive pam-auth-update --enable tmp_unix --disable unix

rm "$config_file"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Password-Initial:
[success=end default=ignore] pam_unix.so obscure yescrypt # nullok
EOF

DEBIAN_FRONTEND=noninteractive pam-auth-update --enable tmp_unix
DEBIAN_FRONTEND=noninteractive pam-auth-update --enable tmp_unix --disable unix

rm "$config_file"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Password-Initial:
[success=end default=ignore] pam_unix.so obscure yescrypt nullok
EOF

DEBIAN_FRONTEND=noninteractive pam-auth-update --enable tmp_unix
DEBIAN_FRONTEND=noninteractive pam-auth-update --enable tmp_unix --disable unix

rm "$config_file"
{{% else %}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ config_file=/usr/share/pam-configs/tmp_unix

cat << EOF > "$config_file"
Name: Unix authentication
Conflicts: unix
Default: yes
Priority: 257
Conflicts: unix
Expand All @@ -32,6 +31,6 @@ Password-Initial:
[success=end default=ignore] pam_unix.so obscure yescrypt
EOF

DEBIAN_FRONTEND=noninteractive pam-auth-update --enable tmp_unix
DEBIAN_FRONTEND=noninteractive pam-auth-update --enable tmp_unix --disable unix

rm "$config_file"
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ config_file=/usr/share/pam-configs/tmp_unix

cat << EOF > "$config_file"
Name: Unix authentication
Conflicts: unix
Default: yes
Priority: 257
Conflicts: unix
Expand All @@ -32,6 +31,6 @@ Password-Initial:
[success=end default=ignore] pam_unix.so obscure yescrypt # nullok
EOF

DEBIAN_FRONTEND=noninteractive pam-auth-update --enable tmp_unix
DEBIAN_FRONTEND=noninteractive pam-auth-update --enable tmp_unix --disable unix

rm "$config_file"
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ config_file=/usr/share/pam-configs/tmp_unix

cat << EOF > "$config_file"
Name: Unix authentication
Conflicts: unix
Default: yes
Priority: 257
Conflicts: unix
Expand All @@ -32,7 +31,7 @@ Password-Initial:
[success=end default=ignore] pam_unix.so obscure yescrypt nullok
EOF

DEBIAN_FRONTEND=noninteractive pam-auth-update --enable tmp_unix
DEBIAN_FRONTEND=noninteractive pam-auth-update --enable tmp_unix --disable unix

rm "$config_file"

3 changes: 2 additions & 1 deletion shared/macros/10-bash.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -975,9 +975,10 @@ if [ ! -f "$conf_path"/"$conf_name" ]; then
if grep -q "$(md5sum "$conf_path"/unix | cut -d ' ' -f 1)" /var/lib/dpkg/info/libpam-runtime.md5sums;then
cp "$conf_path"/unix "$conf_path"/"$conf_name"
chmod 0644 "$conf_path"/"$conf_name"
sed -i 's/^Name: .*/Name: Unix authentication (ComplianceAsCode)/' "$conf_path"/"$conf_name"
sed -i 's/Priority: [0-9]\+/Priority: 257\
Conflicts: unix/' "$conf_path"/"$conf_name"
DEBIAN_FRONTEND=noninteractive pam-auth-update
DEBIAN_FRONTEND=noninteractive pam-auth-update --enable "$conf_name" --disable unix
else
echo "Not applicable - checksum of $conf_path/unix does not match the original." >&2
fi
Expand Down
Loading