im trying to run a sequence of commands from a bin/bash but what i need is log me as a different user and i use something like this
#!/bin/sh
su postgres
postgres
postmaster -D /usr/local/pgsql/data -i
But obviously doesn't work because of the password any suggestions to do this...