Solved

POSTGRESQL on Solaris 10 database credentials

Posted on 2010-08-13
2
844 Views
Last Modified: 2013-12-27
Hey guys,
               Ive been trying to install follow Sun's official guide of ''How to Configure and Run POSTGRESQL on Solaris 10'', found as one of the Solaris 10 How To Guides. There is a part that asks me to create a user called ''postgres'' and assign it to the ''postgres'' group with the use of the following commands
--------------------------------------
# groupadd postgres
#useradd -c 'PostgreSQL User' -d /export/home/postgres -g postgres -m -s /bin/bash postgres
--------------------------------------
Im actually trying to install Numara Footprints 9 which uses postgresql. Somewhere in the installation, foorprints asks me to supply the postgres username and password..trouble is, I dont know the password. I have tried 'postgres' as the password but it fails. However, I have been able to connect to the database and execute sql commands under the user 'postgres'. When I switch to user 'postgres' they dont ask for the password. It just goes.

There are three possibilities:
1)I want to believe that the user ''postgres'' may have already existed since the solaris 10 installation already comes with Postgresql preloaded. But I cant figure out, or change the password, since I dont know the old one. In addition, in the SMC, I can't see the 'postgres' user listed. However, I can switch user to 'postgres' in the terminal. If i try to change the password of postgres, they ask me for the password..and i dont have that.

2)In my sleepiness, I added the wrong password when I typed the command above.

3)The password is actually null/blank. However, Footprints asks that a password must be entered to connect to the database, I cant leave the password field blank during installation.

Can anyone figure out or suggest what can I do next? Many thanks!
0
Comment
Question by:kajun989
2 Comments
 

Expert Comment

by:gsosna
ID: 33434989
kajun989, do you have root access to this machine? If yes, try changing the password for the postgres user when you're logged in as root.
$ passwd postgres
if you're root, then you don't have to enter the current password for any user.
0
 
LVL 12

Accepted Solution

by:
cminear earned 250 total points
ID: 33437192
gsosna's comment would set the Unix password for the 'postgres' user.  However I believe Footprints is expecting the _database_ password for the 'postgres' user.  You set the database password using either ALTER USER within 'psql' (see http://www.postgresql.org/docs/8.1/interactive/sql-alteruser.html).

The reason you can connect to the database without a password is because by default connections using the local Unix sockets do not require a password; they are trusted.  Read about the 'pg_hba.conf' here: http://www.postgresql.org/docs/8.1/interactive/client-authentication.html#AUTH-PG-HBA-CONF
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Steps to create a PostgreSQL RDS instance in the Amazon cloud. We will cover some of the default settings and show how to connect to the instance once it is up and running.

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question