Explain what we are doing before asking for sudo

This commit is contained in:
David Heinemeier Hansson
2025-08-05 09:42:25 +02:00
parent a75c9ef072
commit 2cd841a687
2 changed files with 4 additions and 0 deletions

View File

@@ -3,11 +3,13 @@
~/.local/share/omarchy/bin/omarchy-show-logo
if [[ "--remove" == "$1" ]]; then
echo -e "\e[32mLet's remove your Fido2 device from sudo authentication.\n\e[0m"
yay -Rns --noconfirm libfido2 pam-u2f
sudo rm -rf /etc/fido2
sudo sed -i '\|^auth[[:space:]]\+sufficient[[:space:]]\+pam_u2f\.so[[:space:]]\+cue[[:space:]]\+authfile=/etc/fido2/fido2$|d' /etc/pam.d/sudo
echo -e "\e[32m\nYou've successfully removed the fido2 device setup.\e[0m"
else
echo -e "\e[32mLet's setup your Fido2 device for sudo authentication.\n\e[0m"
yay -S --noconfirm --needed libfido2 pam-u2f
tokens=$(fido2-token -L)