add missing pam.d/su portion

This commit is contained in:
Louis Abel 2024-05-01 14:41:45 -07:00
parent c14492cf60
commit dde128ef2d
Signed by untrusted user: label
GPG Key ID: 2A6975660E424560

View File

@ -626,6 +626,18 @@ EOF
KERNEL_VERSION=$(rpm -q kernel --qf '%{version}-%{release}.%{arch}\n') KERNEL_VERSION=$(rpm -q kernel --qf '%{version}-%{release}.%{arch}\n')
dracut -f /boot/initramfs-${KERNEL_VERSION}.img ${KERNEL_VERSION} dracut -f /boot/initramfs-${KERNEL_VERSION}.img ${KERNEL_VERSION}
rm -rf /etc/ssh/ssh_host_* 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() { function vbox_vagrant_steps() {