views:

225

answers:

1

I accidentally deleted the user 'postgres' user the #userdel command and no longer have access to the database.

What can I do to create a new postgres user and how can I start postgresql again?

If I have to re-install postgresql, do I just delete my current postgres setup by removing the /usr/local/postgresql-8.3.6/ directory?

NOTE: I have no idea how to start postgresql. I basically downloaded a gzip file and unloaded it into a directory /usr/local/postgresql-8.3.6

+2  A: 

Recreate the user - there's nothing special about it. Except it has no password ("!" in the password field in "/etc/shadow"), but that's normal for service accounts.

And you need this system account only for running the service.

If you have downloaded the source ("I basically downloaded a gzip file...") then you need to follow the installation instructions here to make a working installation out of it.

Easier would be to install the provided pre-packaged version of Postgres from Debian:

apt-get install postgresql-8.3 postgresql-contrib-8.3
Milen A. Radev