Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problem running initdb (PostgreSQL)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
DamnDirtyApe
n00b
n00b


Joined: 08 Jan 2003
Posts: 38
Location: Prince George, British Columbia, Canada

PostPosted: Thu Jan 16, 2003 11:16 pm    Post subject: Problem running initdb (PostgreSQL) Reply with quote

I've installed postgresql from portage, and I'm having a problem. Specifically, I can't become the postgres user, so initdb won't let me create a database. Here's a sample of my problem:

Code:

~ # grep postgres /etc/passwd
postgres:x:70:70::/var/lib/postgresql:/bin/false
~ # su postgres
~ # whoami
root
~ # passwd postgres
passwd: Authentication token manipulation error
~ # initdb -D $PGDATA
You cannot run initdb as root. Please log in (using, e.g., 'su')
as the (unprivileged) user that will own the server process.
~ #


Please, any questions, comments or advice are more than welcome. Thx!
Back to top
View user's profile Send private message
DooBeDooBeDo
Apprentice
Apprentice


Joined: 21 Aug 2002
Posts: 220
Location: UK

PostPosted: Fri Jan 17, 2003 12:10 am    Post subject: Reply with quote

Change the login shell to /bin/bash in /etc/passwd for the postgres user, and you'll be able to 'su postgres'

If you have security concerns about this, change it back again after you've run initdb.
Back to top
View user's profile Send private message
DamnDirtyApe
n00b
n00b


Joined: 08 Jan 2003
Posts: 38
Location: Prince George, British Columbia, Canada

PostPosted: Fri Jan 17, 2003 4:35 am    Post subject: fixed Reply with quote

Yep, that did it. Thanks!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum