0

I have a problem with bioutil function. In Terminal, I am using two commands which are working:

  1. sudo bioutil -ws -u 0 # disables TouchID for unlock
  2. sudo bioutil -ws -u 1 # enables TouchID for unlock

But when I try to make a shortcut in the Shortcut APP on macOS, the commands don't work. When I insert and start: #! sudo bioutil -ws -u 0 script is working but nothing happened, Touch ID is still active. What I'm doing wrong?

I have also tried: #!/bin/zsh sudo bioutil -ws -u 0 and #! bioutil -ws -u 0. Still not working.

enter image description here

10
  • Doesn‘t sudo ask for a password?
    – nohillside
    Commented Apr 27, 2022 at 12:44
  • Also, formatting is important, so is the code you put into Shortcuts really just one line or several?
    – nohillside
    Commented Apr 27, 2022 at 13:17
  • In terminal yes – sudo, ask for password, but in shortcuts no.
    – Artur
    Commented Apr 27, 2022 at 13:19
  • Only this one line, nothing more
    – Artur
    Commented Apr 27, 2022 at 13:19
  • It probably can‘t ask because there is no way to do so. But can you please add a screenshot of your whole shortcut?
    – nohillside
    Commented Apr 27, 2022 at 13:26

1 Answer 1

0

From experience with macOS's Automator rather than Shortcuts, I've had success with this pattern before:

osascript -e 'do shell script "sudo /path/to/your/executable"'

With sudo configured to use Touch ID, this window pops up:

enter image description here

1
  • 1
    The OPs intent seems to be to enable/disable TouchID, can you clarify how your answer addresses that?
    – nohillside
    Commented Mar 26 at 15:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .