summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-10-17 20:48:45 +0200
committerChristian Poessinger <christian@poessinger.com>2022-10-17 20:50:08 +0200
commit8403848a338d54f9e489fca1efd1143d820a14a6 (patch)
treee47ac116b6f302cdb537d374aca88be63f078ca2
parent414f435d509092ce40f14977530780155648146e (diff)
downloadvyos-1x-8403848a338d54f9e489fca1efd1143d820a14a6.tar.gz
vyos-1x-8403848a338d54f9e489fca1efd1143d820a14a6.zip
login: 2fa: T874: fix PAM string during ISO build
Turns out a local installation of a package using "dpkg -i" differs when assembling an ISO using live-build. The previous version worked when using "dpkg -i" but it failed hard (no login possible) during ISO build. This has been fixed by using double quotes.
-rw-r--r--debian/vyos-1x.postinst4
1 files changed, 2 insertions, 2 deletions
diff --git a/debian/vyos-1x.postinst b/debian/vyos-1x.postinst
index 959e1d486..d92fd8233 100644
--- a/debian/vyos-1x.postinst
+++ b/debian/vyos-1x.postinst
@@ -25,8 +25,8 @@ fi
for file in /etc/pam.d/sshd /etc/pam.d/login
do
PAM_CONFIG="auth required pam_google_authenticator.so nullok"
- grep -qF -- "$PAM_CONFIG" $file || \
- sed -i '/^@include common-auth/a \\n# Check 2FA/MFA authentication token if enabled (per user)\n$PAM_CONFIG' $file
+ grep -qF -- "${PAM_CONFIG}" $file || \
+ sed -i "/^@include common-auth/a # Check 2FA/MFA authentication token if enabled (per user)\n${PAM_CONFIG}" $file
done
# Add RADIUS operator user for RADIUS authenticated users to map to