Skip to content

Instantly share code, notes, and snippets.

@razhangwei
Created September 3, 2024 02:25
Show Gist options
  • Save razhangwei/71291af0febb734d91112a3e5b5164d1 to your computer and use it in GitHub Desktop.
Save razhangwei/71291af0febb734d91112a3e5b5164d1 to your computer and use it in GitHub Desktop.
run script with sudo without (re-typing) password #Unix
## sudo visudo -f /etc/sudoers.d/custom_config
# /etc/sudoers.d/custom_config
# Extend the sudo ticket lifetime to 2 hours (7200 seconds)
Defaults timestamp_timeout=7200
# Allow your user to run the script without a password
wei ALL=(ALL) NOPASSWD: /Users/wei/start_nano_transcriber.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment