Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm installing PosgreSQL 9.0 over FreeBSD 8.1. In MySQL I have to change the root SQL user's password, here how can I do? And how can I add other SQL users?


share|improve this question

3 Answers 3

Change the 'postgres' password with something like :

psql --echo-all --echo-queries postgres -U postgres --command "alter role postgres encrypted password 'YOURPASSWORD'"

share|improve this answer

Create users with the createuser shell command.

share|improve this answer

to make sure, that there is no password in .bash_history or .psql_history i use the psql-comannd "\password":

$ sudo -u postgres -i
$ psql
# \password
Enter new password: 
Enter it again: 
# create user <user_name>;
# \password <user_name>
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.