Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

postgres not in pg_shadow 1

Status
Not open for further replies.

roycrom

Programmer
Aug 2, 2002
184
GB
help!! for some reason I can no longer get into any database or create users or pg_dump or userdrop.

the reason given is:
psql: FATAL 1: SetUserId: user 'postgres' is not in 'pg_shadow'
how can I get postgres into pg_shadow? or is there some other way around this. Thanks :)
 
Hi roycrom,

If you are running Linux, postgres is a special user that is aready setup. Login to your system as root, or su to root, and assign the linux postgres user a password just like any other user. Next, as root, edit the pg_hba.conf file and set all permissions to trusted. Now you can login to postgresql without the need of a password.

Check the postgressql documentation for syntax and assign the postgres user the same password you assign for linux postgres user.

After you have done this, go back to the pg_hba.conf file and set security back to password, crypt, etc. Reboot/Restart the postmaster so it can re-evaluate the changes. Now login to postgresql and enter the new password. Leland F. Jackson, CPA
Software - Master (TM)
Nothing Runs Like the Fox
 
Thanks Leland123. I found your reply very helpful and have now cleared up the problem. As this was my first post as a member I was very pleased with the way the forum worked and will definitely be using in the future. Who knows, even I might be able to help someone out. :))
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top