newbie question

Daniel J. Luke dluke at geeklair.net
Tue May 3 15:56:50 PDT 2011


On May 3, 2011, at 6:43 PM, Mark Hattam wrote:
> 
> On 3 May 2011, at 23:25, Ryan Schmidt wrote:
>> On May 3, 2011, at 00:12, Tena Sakai wrote:
>>> Having installed it, the first thing I want to do is to run
>>> 'psql postgres' command.  When I do this, it asks me
>>> postgres user password.  I have no idea what that is
>>> (I think maybe macport created postgres user?).  

If 'psql postgres' is asking you for a password, it's asking you for your password to access the postgres database (you can change how postgres does authentication - it's pretty flexible). 

I think the default config uses 'trust' authentication, so you can do something like:

psql -U postgres postgres

and you'll connect as the database super-user (postgres) to the database named 'postgres'.

>>> When
>>> I use "Accounts" from System Preferences it shows no
>>> such user as postgres.  However, I can become root
>>> and then issue 'su postgres' command and strangely
>>> enough I am indeed user postgres.
>>> 
>>> Can you please give me a tip as to how to reset password
>>> for user postgres?

root can change any system user's account passsword ('sudo passwd postgres'), but that probably won't do what you want.

I would recommend that you don't set a password for the 'postgres' system account.

> ... which of course isn't in my $PATH as it's in
> /opt/local/lib/postgresql84/bin/
> so why it's tucked away someother other than
> /opt/local/bin
> I don't know

so that you can have multiple versions of postgres installed at the same time.

--
Daniel J. Luke                                                                   
+========================================================+                        
| *---------------- dluke at geeklair.net ----------------* |                          
| *-------------- http://www.geeklair.net -------------* |                          
+========================================================+                        
|   Opinions expressed are mine and do not necessarily   |                          
|          reflect the opinions of my employer.          |                          
+========================================================+





More information about the macports-users mailing list