Macro to shutdown computer without confirmation (no password, no saving, just hard shutdown)


Is such thing possible via keyboard maestro?

I tried to create a script with
sudo -u root shutdown -h now
but it asks for my password.

Thank you


I thought I found a solution here:

but I don’t know the “user_name” that keyboard maestro uses to put in the command

user_name ALL=(ALL) NOPASSWD: /usr/local/bin/force-shutdown

Can anyone give me a hand?

Thank you

Hey Leonardo,

Search for OSX solutions:

os x reboot terminal


thank you Chris