<br><br><div><span class="gmail_quote">On 10/30/07, <b class="gmail_sendername">Clint Dilks</b> <<a href="mailto:clintd@scms.waikato.ac.nz">clintd@scms.waikato.ac.nz</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
You could set up the User so that no password is required from Localhost<br>if that is appropriate<br><br><br>Tronn Wærdahl wrote:<br>> I have a shell script (sh) where I create a user and import data to a<br>> postgres database
<br>><br>> <snip><br>> su -c "createuser -A -D -P $PG_user" postgres<br>> su -c "psql -d$PG_database -h localhost -U$PG_user -W -f<br>> postgresql.sql " postgres<br>> </snip>
<br>><br>> when the script executes those command, it ask for a password, how<br>> could I do this without have to enter the passwd, I would like that it<br>> reads the password from a variabel, that excists in a separate file, like
<br>><br>> <variable file><br>> PG_passwd=secret<br>> PG_user =username<br>> PG_database=simple<br>> </variable file><br>><br>><br>> Tronn<br>> ------------------------------------------------------------------------
<br>><br>> _______________________________________________<br>> CentOS mailing list<br>> <a href="mailto:CentOS@centos.org">CentOS@centos.org</a><br>> <a href="http://lists.centos.org/mailman/listinfo/centos">
http://lists.centos.org/mailman/listinfo/centos</a><br>><br><br>_______________________________________________<br>CentOS mailing list<br><a href="mailto:CentOS@centos.org">CentOS@centos.org</a><br><a href="http://lists.centos.org/mailman/listinfo/centos">
http://lists.centos.org/mailman/listinfo/centos</a><br></blockquote></div><br><br clear="all"><br>Yes that is a possiblity, <span class="sg">Joachim I dont see how this can be accomplished with sudo, could you provide some example syntax
<br><br>Tronn<br></span>