From dde128ef2da3f4cba951a57e18e805054a4afc5b Mon Sep 17 00:00:00 2001 From: Louis Abel Date: Wed, 1 May 2024 14:41:45 -0700 Subject: [PATCH] add missing pam.d/su portion --- config.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/config.sh b/config.sh index a6df715..2562329 100644 --- a/config.sh +++ b/config.sh @@ -626,6 +626,18 @@ EOF KERNEL_VERSION=$(rpm -q kernel --qf '%{version}-%{release}.%{arch}\n') dracut -f /boot/initramfs-${KERNEL_VERSION}.img ${KERNEL_VERSION} rm -rf /etc/ssh/ssh_host_* + + # Might not be needed for 10 + ex -s /etc/pam.d/su <<'EOF' +/^account\s\+sufficient\s\+pam_succeed_if.so uid = 0 use_uid quiet$/ +:append +account [success=1 default=ignore] \\ + pam_succeed_if.so user = vagrant use_uid quiet +account required pam_succeed_if.so user notin root:vagrant +. +:update +:quit +EOF } function vbox_vagrant_steps() {