Option 1 su - postgres psql template1 CREATE USER tom WITH PASSWORD 'myPassword'; CREATE DATABASE jerry; GRANT ALL PRIVILEGES ON DATABASE jerry to tom; Option 2: su postgres postgres@debian: createuser tom postgres@debian: createdb jerry psql template1 \password tom GRANT ALL PRIVILEGES ON DATABASE jerry to tom; import postgres@mimaquina $ psql jerry < dumpfile