Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

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?

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

    Hi,

    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.

    McA

Re: Password prompt
by kcott (Abbot) 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 kcott (Abbot) 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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1050132]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2014-07-26 07:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (175 votes), past polls