[ADMIN] Postgresql Service Failed Error
Hii I have installed postgresql-8.2.6 in /usr/local/postgresql/ directory. I have also created the data dictionary in /var/lib/pgsql/data directory using following commands: /usr/local/postgresql/bin/initdb -D /var/lib/pgsql/data/ The owner of my var/lib/pgsql/data directory is globus and owner of usr/local/postgresql/bin/initdb is root I have also edited the following files in /var/lib/pgsql/data/postgresql.conf by adding listen_addresses='*' and /var/lib/pgsql/data/pg_hba.conf by adding host rftDatabase "globus" "140.221.8.31" 255.255.255.255 md5 Now when I am trying to run /etc/init.d/postgresql restart : It gives me following error: Stopping postgresql service: [FAILED] Starting postgresql service: [FAILED] Can anybody help?? Thanks in advance Arpit
Re: [ADMIN] Postgresql Service Failed Error
arpit jain wrote: Hii I have installed postgresql-8.2.6 in /usr/local/postgresql/ directory. I have also created the data dictionary in /var/lib/pgsql/data directory using following commands: What OS? /usr/local/postgresql/bin/initdb -D /var/lib/pgsql/data/ The owner of my var/lib/pgsql/data directory is globus Is this the same user that is running the postgresql service? check /etc/init.d/postgresql to see what username the service is being started as (usually postgres or pgsql) This user should be the only one that can access the data dir (apart from root) Bad data dir permissions will prevent postgresql from starting. and owner of usr/local/postgresql/bin/initdb is root That's OK I have also edited the following files in /var/lib/pgsql/data/postgresql.conf by adding listen_addresses='*' and /var/lib/pgsql/data/pg_hba.conf by adding host rftDatabase "globus" "140.221.8.31" 255.255.255.255 md5 Now when I am trying to run /etc/init.d/postgresql restart : It gives me following error: Stopping postgresql service: [FAILED] Starting postgresql service: [FAILED] Is postgres already running? are you running the postgresql restart as root? In your data dir you should find serverlog that should give more info - also try system or console logs -- Shane Ambler pgSQL (at) Sheeky (dot) Biz Get Sheeky @ http://Sheeky.Biz -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin
[ADMIN] PQconnectdb question and md5 password
Hello, I don't know how can I pass a md5 password to the password field ? example : connInfo = "host=localhost port=5432 dbname=db_stats user=postgres password=secret"; pConn = PQconnectdb(connInfo); I try to replace the string 'secret' by the content of /etc/shadow but without succès. Thanks in advance Guy -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin
Re: [ADMIN] PQconnectdb question and md5 password
How do you have your pg_hba.conf file setup ? If on the shell as the postgres user, you can login into the "db_stats" database without a password being asked for than you should not need one. Try out: postgres$> psql db_stats and see if you can login without asking for a PW.. check your pg_hba.conf first though. On May 6, 2008, at 5:07 AM, Guy Deleeuw wrote: Hello, I don't know how can I pass a md5 password to the password field ? example : connInfo = "host=localhost port=5432 dbname=db_stats user=postgres password=secret"; pConn = PQconnectdb(connInfo); I try to replace the string 'secret' by the content of /etc/shadow but without succès. Thanks in advance Guy -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin
Re: [ADMIN] PQconnectdb question and md5 password
Hi Gus, You should be able to, I'm not a C guru but on perl I can without any issues. Did you setup a password for the postgres user account in postgreSQL itself ? I found strange that you were trying out the password from /etc/shadow file though. > ALTER USER postgres WITH ENCRYPTED PASSWORD 'secret'; What error the postgres log gives you ? On May 6, 2008, at 12:58 PM, Guy Deleeuw wrote: Hello Marcelo, Thanks for your respons I have a password and is what I need. My pg_hba.conf have 'md5' : hostall all 127.0.0.1/32 md5 My question are just how I can connect from the C api with an md5 password or it's not possible ? Regards Guy Marcelo Martins a écrit : How do you have your pg_hba.conf file setup ? If on the shell as the postgres user, you can login into the "db_stats" database without a password being asked for than you should not need one. Try out: postgres$> psql db_stats and see if you can login without asking for a PW.. check your pg_hba.conf first though. On May 6, 2008, at 5:07 AM, Guy Deleeuw wrote: Hello, I don't know how can I pass a md5 password to the password field ? example : connInfo = "host=localhost port=5432 dbname=db_stats user=postgres password=secret"; pConn = PQconnectdb(connInfo); I try to replace the string 'secret' by the content of /etc/shadow but without succès. Thanks in advance Guy -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin -- Guy De Leeuw IT Manager Eurofer 5, avenue Ariane Building "Integrale" (3rd floor) 1200, Bruxelles Belgium Phone : +32 (2) 738 79 40 Mobile : 00 32 498 93 65 00 Fax : +32 (2) 736 28 22 E-Mail : mailto:[EMAIL PROTECTED] www : http://www.eurofer.org -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin
Re: [ADMIN] PQconnectdb question and md5 password
Hello Marcelo, Thanks for your respons I have a password and is what I need. My pg_hba.conf have 'md5' : hostall all 127.0.0.1/32 md5 My question are just how I can connect from the C api with an md5 password or it's not possible ? Regards Guy Marcelo Martins a écrit : How do you have your pg_hba.conf file setup ? If on the shell as the postgres user, you can login into the "db_stats" database without a password being asked for than you should not need one. Try out: postgres$> psql db_stats and see if you can login without asking for a PW.. check your pg_hba.conf first though. On May 6, 2008, at 5:07 AM, Guy Deleeuw wrote: Hello, I don't know how can I pass a md5 password to the password field ? example : connInfo = "host=localhost port=5432 dbname=db_stats user=postgres password=secret"; pConn = PQconnectdb(connInfo); I try to replace the string 'secret' by the content of /etc/shadow but without succès. Thanks in advance Guy -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin -- Guy De Leeuw IT Manager Eurofer 5, avenue Ariane Building "Integrale" (3rd floor) 1200, Bruxelles Belgium Phone : +32 (2) 738 79 40 Mobile : 00 32 498 93 65 00 Fax : +32 (2) 736 28 22 E-Mail : mailto:[EMAIL PROTECTED] www : http://www.eurofer.org -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin
Re: [ADMIN] PQconnectdb question and md5 password
Gus ? :-) No I need to put the md5 string into the connInfo, just that. the other parts work fine Guy Marcelo Martins a écrit : Hi Gus, You should be able to, I'm not a C guru but on perl I can without any issues. Did you setup a password for the postgres user account in postgreSQL itself ? I found strange that you were trying out the password from /etc/shadow file though. > ALTER USER postgres WITH ENCRYPTED PASSWORD 'secret'; What error the postgres log gives you ? On May 6, 2008, at 12:58 PM, Guy Deleeuw wrote: -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin
Re: [ADMIN] PQconnectdb question and md5 password
Guy Deleeuw <[EMAIL PROTECTED]> writes: > No I need to put the md5 string into the connInfo, just that. No, you need to put the plain text of the password into the connInfo. Knowing the md5 doesn't prove you know the password. regards, tom lane -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin
Re: [ADMIN] PQconnectdb question and md5 password
Hello Tom No, you need to put the plain text of the password into the connInfo. Knowing the md5 doesn't prove you know the password. regards, tom lane I just try to cancel the easy way to "string" the binary and extract the password from my app. A solution are to put the md5 string and not the clear password. but if it's not possible, a follow another way. Thanks for your respons. Regards Guy -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin