pmset/mise/Task/lid-awake/install-sudoers
Properties
- logseq-entity
- Logseq/Entity/Mise/Task
- task-owner
- Person/codekiln/GitHub/dotfiles
- task-config-root
- chezmoi/dot_config/mise
- task-name
- pmset:lid-awake:install-sudoers
Allow the Lid-Awake Switch Without a Password
- Installs a sudoers rule so pmset/mise/Task/lid-awake/enable and pmset/mise/Task/lid-awake/restore run without a password prompt.
Invocation
Side effects
- Writes
/etc/sudoers.d/pmset-lid-awake, mode0440, owned byroot:wheel. The rule lets the current user run/usr/bin/pmset -a disablesleep 1and/usr/bin/pmset -a disablesleep 0withNOPASSWD. Every othersudocommand still asks for a password. - Checks the rule with
visudo -cfbefore installing it, and the whole sudoers configuration withvisudo -cafter. A failed second check removes the file. --removedeletes the file.
- Writes
Trade-off
- Any process running as the user can switch lid-close sleep without a prompt. Touch ID for
sudoasks for a fingerprint each time instead, applies to everysudocommand, and needspam_reattachto work inside tmux.
- Any process running as the user can switch lid-close sleep without a prompt. Touch ID for
Source and help