Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am a complete amateur in Linux.

There is a software that only runs on Linux. It came with a virtual machine package and every thing.

When inside the virtual machine, I run a .py file in the terminal and it starts downloading the software. The software file is quite large. I noticed every time I let the software to download, the installation wants to start and asks me for the password. I am usually not there to enter and it fails.

I wanted to see how I can get over this problem. Thanks

share|improve this question
Unless you give us the name of the software, there's not much we can do. – rahmu Mar 22 '13 at 7:57

Expect scripting might come in help for you.Here is a sample :

read -s PWD
/usr/bin/expect <<EOD
spawn ./program.pl
expect "Password:"
send "your password\r";

Here is Tutorial for expect scripting :Expect scripting from Oreilly

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.