You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Charles Wesley <ch...@oracle.com> on 2010/10/11 22:21:00 UTC

[exec] Using Commons Exec to Input a Password to a Shell Script

We are trying to use Apache commons exec to execute a shell script which 
takes several inputs, one of which is a password which is not echoed to 
stdout for security purposes.  We were using the PumpStreamHandler and 
using a ByteArrayInputStream object as the InputStream parameter for the 
PumpStreamHandler constructor.  The clear text inputs are working as 
expected but we are not able to progress after the prompt for the 
password.  Do you have any suggestions on how to approach sending a 
password via commons exec?

Thanks,

Charles

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: [exec] Using Commons Exec to Input a Password to a Shell Script

Posted by Siegfried Goeschl <si...@it20one.at>.
  Hi Charles,

how are you reading the password into the shell script? And which shell 
are you using?

Short exampe would be welcome ....

Siegfried Goeschl

On 10/11/10 10:21 PM, Charles Wesley wrote:
>
> We are trying to use Apache commons exec to execute a shell script 
> which takes several inputs, one of which is a password which is not 
> echoed to stdout for security purposes.  We were using the 
> PumpStreamHandler and using a ByteArrayInputStream object as the 
> InputStream parameter for the PumpStreamHandler constructor.  The 
> clear text inputs are working as expected but we are not able to 
> progress after the prompt for the password.  Do you have any 
> suggestions on how to approach sending a password via commons exec?
>
> Thanks,
>
> Charles
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org