<div dir="ltr">On Tue, Sep 13, 2011 at 17:07, Brandon Allbery <span dir="ltr"><<a href="mailto:allbery.b@gmail.com">allbery.b@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div dir="ltr"><div class="im">On Tue, Sep 13, 2011 at 16:59, Puneet Kishor <span dir="ltr"><<a href="mailto:punk.kish@gmail.com" target="_blank">punk.kish@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>$sudo su postgres -c '/opt/local/lib/postgresql90/bin/pg_ctl start -D /path/to/db/postgresql90/defaultdb -l ~/Logs/postgresql90-server/main.log'<br>
<br>
but, I don't know the password for the 'postgres' user</div></blockquote></div><br></div>Are you using the actual command you quoted? The "sudo" shifts to root, which doesn't need a password to "su postgres".</div>
</blockquote></div><div><br></div>Oh, the "$" isn't part of the command; if you're typing it, then the shell is trying to expand a variable called "sudo" that is probably empty, so you'd get the password prompt.<div>
<br></div><div> sudo su postgres -c '/opt/local/lib/postgresql90/bin/pg_ctl start -D /path/to/db/postgresql90/defaultdb -l ~/Logs/postgresql90-server/main.log'<br clear="all"><div><br></div><div>(all on one line)</div>
<div><br></div>-- <br>brandon s allbery <a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a><br>wandering unix systems administrator (available) (412) 475-9364 vm/sms<br>
<br>
</div></div>