Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Password prompt

by anandooty (Initiate)
on Aug 20, 2013 at 07:00 UTC ( #1050132=perlquestion: print w/replies, xml ) Need Help??
anandooty has asked for the wisdom of the Perl Monks concerning the following question:

How Can My Script Submit a Password when Prompted by an Application?

Replies are listed 'Best First'.
Re: Password prompt
by kcott (Chancellor) on Aug 20, 2013 at 07:26 UTC

    G'day anandooty,

    "How Can My Script Submit a Password when Prompted by an Application?"

    Two days ago you asked about this in "Need help in while entering password". That thread is still current with the most recent reply being only a couple of hours ago. Are you now asking about something else? Is this a follow-up question?

    Several monks pointed out that you were posting insufficient information and you were provided with the "How do I post a question effectively?" link a couple of times. You seem to have completely ignored that advice with this lastest question. Let me reiterate what I wrote in that thread (with respect to the lack of information in your original question):

    "Have a read of "How do I post a question effectively?" then, following those guidelines, update your post with something we can work with ("How do I change/delete my post?" tells you how to do that)."

    Please do this!

    -- Ken

      Hi Ken.

      While anandooty does seem, once again, to be relying rather more on our powers of clairvoyance than is warranted, the suggestion to start a new thread was mine here. The question to which I was replying seemed sufficiently different from the question OPed in that thread: How does one pass a password, etc., to a Perl script via the command line or <STDIN>? anandooty subsequently wanted to know how a script could respond to the prompting of another application for input. It seemed to me that something like Expect would do the trick, but I have no direct knowledge of this module, so thought it best to appeal to the community.

Re: Password prompt
by McA (Priest) on Aug 20, 2013 at 07:15 UTC


    when the password is read from STDIN you can simply write it to STDIN. But in most cases the password is read from the console device when the shell is interactive. Then you have a chance to do it with Expect.


Re: Password prompt
by kcott (Chancellor) on Aug 21, 2013 at 08:33 UTC

    ++AnomalousMonk has pointed out (above) why you started a new thread. Starting a new thread is absolutely fine. When a new thread follows on from a previous thread, it's useful to provide a link to the earlier thread so that respondents have some context and don't waste time reproducing advice that may have already been given.

    In the current thread, you've given "Password prompt" as the title. That's rather vague and could equally apply to your previous thread. Moreover, AnomalousMonk actually provided you with a suggested title for your new thread: you could have just used that. See "How do I compose an effective node title?" for more information on this.

    For your question, you've simply used the suggested title. You've provided no context or other details despite having received advice about why this is not useful and how you could do it better.

    We're more than happy to help but you need to help us to help you.

    -- Ken

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1050132]
Approved by Corion
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2018-02-21 07:57 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (276 votes). Check out past polls.