-   Ubuntu (
-   -   Postgresql error FATAL: user "root" does not exist" (

cgetty 06-21-2005 02:09 AM

Postgresql error FATAL: user "root" does not exist"
I'm using kUbuntu.
using the package manager I installed Postgresql.

When my PC boots up I see it (Postgresql) loadup.

When I try to add a user of create a database I get an error.

For example when I try to create a database:
cgetty@clark:~$ sudo -s -H
createdb mydb

I get this
"createdb: could not connect to database template1: FATAL: user "root" does not exist"

Any one have any ideas ?


elsheikhmh 06-21-2005 03:57 AM

1. Ubuntu disables the root user account by default. To enable it, open up a console and type sudo and then your regular user's password. Then type passwd root to set the root user's password. You should now be able to log in as root.


2. To set the root password use this command
sudo passwd
It will first prompt for a password, this is your user's password. Then it will ask you the password to set for root. After you set the password, you can then login as root or su to root.

enable the root, then try again.

actually, the topic is at


cgetty 06-21-2005 11:19 AM

I tried both options with no success.
Hi elsheikhmh

I tried both options with no success.

Option 1
cgetty@clark:~$ passwd root
passwd: You may not view or modify password information for root.

Option 2
I think that just changed the password for the current user.

Thanks for responding

I'm sure there is a work around, I just need to find it.


stalefries 06-21-2005 01:43 PM

You forgot to

during the first option.

cgetty 06-21-2005 03:11 PM

thanks, I'll try it.

All times are GMT -5. The time now is 10:12 AM.