Skip to content

Instantly share code, notes, and snippets.

View hkitago's full-sized avatar

hkitago hkitago

  • Kawasaki
View GitHub Profile
@hkitago
hkitago / install-pam_tid-and-pam_reattach.sh
Last active February 21, 2022 23:30 — forked from kawaz/install-pam_tid-and-pam_reattach.sh
sudo で TouchID が使えるようにする。tmux 内で使えるようにもする。TESTED: 12.2.1(21D62)
#!/bin/bash
set -e
set -o pipefail
# pam_tidの存在チェック(間違えてLinux環境などで実行されたら中断する)
test -f /usr/lib/pam/pam_tid.so.2 || exit 1
# sudoでTouchIDが使えるようにする
if ! grep -Eq '^auth\s.*\spam_tid\.so$' /etc/pam.d/sudo; then
( set -e; set -o pipefail