[meta] pam_reattach for sudo w/Touch ID in tmux

pull/35/head
Alpha Chen 3 years ago
parent 7116c83b0a
commit ad23855ef5

@ -25,6 +25,7 @@
- direnv - direnv
- exa - exa
- fasd - fasd
- fd
- ffmpeg - ffmpeg
- fzf - fzf
- git - git
@ -47,6 +48,7 @@
- ykman - ykman
- youtube-dl - youtube-dl
- zsh - zsh
- fabianishere/personal/pam_reattach
- name: install universal ctags - name: install universal ctags
homebrew: homebrew:
@ -84,7 +86,6 @@
- font-hack - font-hack
- font-hasklig - font-hasklig
- font-source-code-pro - font-source-code-pro
- google-chrome
- hammerspoon - hammerspoon
- kaleidoscope - kaleidoscope
- mailmate - mailmate

@ -21,3 +21,21 @@
/usr/libexec/PlistBuddy /usr/libexec/PlistBuddy
-c "Add :DCSActiveDictionaries:0 string /Users/alpha/Library/Containers/com.apple.Dictionary/Data/Library/Dictionaries/websters-1913.dictionary" -c "Add :DCSActiveDictionaries:0 string /Users/alpha/Library/Containers/com.apple.Dictionary/Data/Library/Dictionaries/websters-1913.dictionary"
~/Library/Preferences/com.apple.DictionaryServices.plist ~/Library/Preferences/com.apple.DictionaryServices.plist
- name: Enable Touch ID for sudo
become: yes
lineinfile:
path: /etc/pam.d/sudo
insertafter: '^auth\s+sufficient'
regexp: '^auth\s+sufficient\s+pam_tid.so$'
line: "auth\tsufficient\tpam_tid.so"
- name: Enable Touch ID for sudo in tmux
block:
- shell: brew --prefix
register: brew_prefix
- lineinfile:
path: /etc/pam.d/sudo
insertbefore: '^auth\tsufficient\tpam_tid.so'
regexp: '^auth\s+optional\s+.*pam_reattach.so$'
line: "auth\toptional\t{{ brew_prefix.stdout | trim }}/lib/pam/pam_reattach.so"
become: yes

Loading…
Cancel
Save