Uploaded image for project: 'MINA SSHD'
  1. MINA SSHD
  2. SSHD-1268

sudo su non interactively entering a password

    XMLWordPrintableJSON

Details

    • Story
    • Status: Resolved
    • Major
    • Resolution: Information Provided
    • None
    • None
    • None

    Description

      I would like some code examples as to how I would achieve the following.

      I have a working Non Prod use case whereby all that is required is pub/priv key authentication.

      For Prod, I need

      (a) username/password authentication - which isn't an issue. Once logged in, 

      (b) that user needs to run a "sudo su" to a permissioned account in order to continue. 

      It is (b) that is proving tricky as I need to simulate user interaction (non interactively) to enter a password upon seeing a prompt. 

       

      I'm aware there are interfaces / classes (UserInteraction, UserAuthKeyboardInteractive) that might be able to help with this but I would appreciate some code examples if possible. 

       

      Thanks!

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              harrison51uk Harrison
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: