Forum Discussion

Former Member's avatar
Former Member
4 years ago

Sudo support

Is there a way (maybe alias it?) to use the new CLI features to let you use biometrics to unlock sudo password prompts?


1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided

7 Replies

  • Former Member's avatar
    Former Member

    We do have an internal ticket open for this, I'll make sure to update this thread when any progress on that has been made.

    Best,
    Horia

  • Former Member's avatar
    Former Member

    Just in case somebody else runs into this - the advice by XIII above is great... but doesn't work if you are in tmux.

    https://superuser.com/questions/1342926/sudo-with-auth-sufficient-pam-tid-so-does-not-work-with-tmux

  • Former Member's avatar
    Former Member

    @"Horia.Culea_1P" Yes, that scenario is the basis of my ask - I'm ssh'ed into another machine, get a sudo prompt and would love to somehow use my local biometric auth method to answer it. But even simpler is the local device. I open a command prompt, sudo and have a prompt. XIII above gave a pointer to one way (although I so far didn't get it to work), but it seems like it might be possible to use the 1password cli stuff to have it work.

    • puck's avatar
      puck
      New Contributor

      Anonymous, I recently developed a solution for exactly your use case.

      `sudo` has `--askpass` option that calls an external program to get the password. It’s used primarily to launch some GUI tool, but it can also be utilized when SSH-ing into a remote host.

      My full instructions here: https://lebkowski.name/sudo/

       

  • Former Member's avatar
    Former Member

    Hey @bdillahu, thank you for reaching out to us!

    Can you please give us more information about your use-case? From what I understand, you have a remote server that you ssh into. This server has biometric authentication enabled with the CLI, and you would like the authorisation prompt to be redirected, through the ssh connection, to the machine that you physically have access to, is this correct?

    I am looking forward to hearing back from you!
    Best,
    Horia

  • Former Member's avatar
    Former Member

    Thanks! That's handy and I'll play with that - I don't think it solves for when I'm remoted/ssh'ed into some other machine (my Linux server say) and need to elevate privileges there...