Hi Robert,<br><br><div class="gmail_quote">On Fri, Jul 4, 2008 at 9:27 PM, Robert Dailey <<a href="mailto:rcdailey@gmail.com">rcdailey@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
HI,<br>
<br>
I'm running Ubuntu Server 8.04 and I'm creating a bash script to start<br>
a server program as follows:<br>
<br>
su ventrilo -c "/etc/ventrilo/ventrilo_srv -d"<br>
<br>
However, the 'su' command makes me insert the password for user<br>
'ventrilo' when I run the bash script containing the line of code<br>
above. How can I make this work without the password prompt? I also<br>
don't want this to be a security issue (for example, I don't want<br>
people to be able to connect to my server using PuTTY and login as<br>
'ventrilo' with no password...<br>
</blockquote><div><br>Since you are using all this from a script, you can use "expect".<br>The sequence of commands would go something like this :<br>spawn <your comand><br>expect "Password:"<br>
send "<your password>"<br>interact<br><br>To get expect :<br>sudo apt-get install expectk<br><br><br>Thanks,<br>Raseel<br><a href="http://raseel.in/techblog">http://raseel.in/techblog</a><br></div></div><br>