Problem with starting Postgresql90-server

After I installed postgresql90-server, I tried to start it with
Code:
#/usr/local/etc/rc.d/postgersql initdb

It was asking me for a "password"; I never set up any passwd, I tried user and root passwd but id didn't work. I also set in my /etc/rc.conf
Code:
postgresql_enable="YES"
and reboot the system, and while it was booting up, it asked me again for password. Anyway, I have no idea what kind of password it is asking for. Any idea please, how can I start postgersql?

This is my /var/log/auth.log:

Code:
May  6 14:45:32 agni su: BAD SU agni to pgsql on /dev/pts/8
May  6 14:59:09 agni su: BAD SU root to pgsql on /dev/pts/2

I'm using FreeBSD-8.2-RELEASE amd64
 
Make sure the account "pgsql" exists. Also make sure you are root when you're starting postgresql.
 
SirDice said:
Make sure the account "pgsql" exists. Also make sure you are root when you're starting postgresql.

This is in my /etc/passwd:
Code:
pgsql:*:70:70:PostgreSQL Daemon:/usr/local/pgsql:/bin/sh

and, after I type as root:

Code:
agni# /usr/local/etc/rc.d/postgresql start
Password:
or
Code:
agni# /usr/local/etc/rc.d/postgresql initdb
Password:

this is what I get, same thing happened if I do as user.
 
As root what happens if you do
# su pgsql

It should switch to the pgsql user without asking for a password.
If it does ask for a password there's something wrong with the way su(1) is set up.
 
SirDice said:
As root what happens if you do
# su pgsql

Same thiong, it's asking for password.

Code:
su pgsql
Password:

I reinstalled also, but, same thing. Weird, I never did anything to change su.
 
SirDice said:
Can you post the content of /etc/pam.d/su?
# more /etc/pam.d/su
Code:
# $FreeBSD: src/etc/pam.d/su,v 1.16.32.1.6.1 2010/12/21 17:09:25 kensmith Exp $
#
# PAM configuration for the "su" service
#

# auth
#auth           sufficient      pam_rootok.so           
#auth           sufficient      pam_self.so             
auth            requisite       pam_group.so            
auth            include         system

# account
account         include         system

# session
session         required        pam_permit.so
 
Hmm.. That looks distinctly different then mine:
Code:
#
# $FreeBSD: src/etc/pam.d/su,v 1.16.32.1 2009/08/03 08:13:06 kensmith Exp $
#
# PAM configuration for the "su" service
#

# auth
auth            sufficient      pam_rootok.so           no_warn
auth            sufficient      pam_self.so             no_warn
auth            requisite       pam_group.so            no_warn group=wheel root_only fail_safe
auth            include         system

# account
account         include         system

# session
session         required        pam_permit.so

Note the two remarks for pam_rootok.so and pam_self.so on yours.
 
Now, I'm going to change it, How that could happened? Anyway, thank you SirDice, I'm really grateful for your time.

After I changed /etc/pam.d/su everything is ok, it works!
Thanks again SirDice!
 
No idea how it could have happened. Perhaps a botched mergemaster run.

It was the missing pam_rootok(8) that caused the password question.
 
Back
Top