How would I get my Vagrant shell script to supply the password when creating a user while provisioning phpPgAdmin?
ie. when I supply this command sudo htpasswd -c /etc/phppgadmin/.htpasswd vagrant it prompts for a password for the vagrant user so I can login to phpPgAdmin.  How can I script this into my shell provisioning script that goes with my Vagrantfile?
 
                        
First, you need to force
htpasswdto read passwords from stdin. It can be done by supplying-iswitch.Second, you need to pass a string into
htpasswdstdin. This can be achieved in numerous ways. For example you can redirect stdout ofechointo stdin ofhtpasswd.So resulting command would look like this