Add script to enable Touch ID for sudo
This commit is contained in:
parent
5fa5027a13
commit
cb6d55f4bb
1 changed files with 20 additions and 0 deletions
20
enable-sudo-touch-id
Executable file
20
enable-sudo-touch-id
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
|
||||
grep -F "pam_tid" /etc/pam.d/sudo >/dev/null
|
||||
case $? in
|
||||
0)
|
||||
echo "TouchID unlock already in place"
|
||||
;;
|
||||
|
||||
1)
|
||||
sudo sed -i '' '1a\
|
||||
auth sufficient pam_tid.so
|
||||
' /etc/pam.d/sudo
|
||||
|
||||
echo "TouchID unlock enabled"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Error trying to read /etc/pam.d/sudo"
|
||||
;;
|
||||
esac
|
||||
Loading…
Reference in a new issue