Skip to content

Instantly share code, notes, and snippets.

@cweiland
Created August 2, 2025 22:35
Show Gist options
  • Save cweiland/b64b6d49f0c75c34fdaae622cd0172e6 to your computer and use it in GitHub Desktop.
Save cweiland/b64b6d49f0c75c34fdaae622cd0172e6 to your computer and use it in GitHub Desktop.
Fix idp authentication on a (LXC?) Debian-like host on a freeipa/idm domain
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root or sudo"
exit 1
fi
echo "Caution : this script expect a freeipa/idm joined host."
echo "⚠️ Would you want to continue? (y/n)"
read -r answer
case "$answer" in
y|Y )
;;
n|N )
echo "🛑 Aborted by user."
exit 1
;;
* )
echo "❌ Invalid input. Please answer 'y' or 'n'."
exit 2
;;
esac
echo "Install sssd-ipa and krb5-pkinit"
apt install krb5-pkinit sssd-idp -y
ln -s /usr/lib/x86_64-linux-gnu/sssd
echo "You can try now with "
echo "KRB5_TRACE=/dev/stdout kinit -n -c ./fast.ccache"
echo "KRB5_TRACE=/dev/stdout kinit -T ./fast.ccache <user>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment