Re: How to add an userA to login postgresadmin

From: Stephen Liu <satimis(at)yahoo(dot)com>
To: joseph speigle <joe(dot)speigle(at)jklh(dot)us>, pgsql-general(at)postgresql(dot)org
Subject: Re: How to add an userA to login postgresadmin
Date: 2004-07-05 16:41:05
Message-ID: 20040705164105.75833.qmail@web40312.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi joseph,

Tks for your advice.

- snip -

> after adding the user, create an alias in .bashrc
> like
> alias psql='/usr/local/psql -U postgresadmin -d
> my_db_name'
> Furthermore, in /home/username (that is, that user's
> ~ home directory) you can put a .pgpass file which
> contains the password for postgresadmin

I am prepared to allow useA to su 'postgresadmin'. I
don't want to give userA the 'root password' so that
he can su 'root' and then su 'postgresadmin'

I performed following steps;

# touch /home/satimis/.pgpass
# pico /home/satimis/.pgpass
adding 'abc' as passwd

cat /home/postgresadmin/.bashrc
# .bashrc
# User specific aliases and functions
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi

Whether adding following line after 'fi'
alias psql='/usr/local/psql -U postgresadmin -d
my_db_name'

kindly advise.

Beside what shall I type for 'my_db_name”

> HOWEVER, it would have been simpler to simply use
> the 'postgres' system account as it is the universal
> default

Noted with thanks

TIA

B.R.
Stephen

> On Fri, Jul 02, 2004 at 07:56:09PM +0800, Stephen
> Liu wrote:
> > Hi folks,
> >
> > RH8.0
> > postgresql-7.4.3.tar.gz
> >
> > I have postgresql-7.4.3 installed
> >
> > $ whereis pgsql
> > pgsql: /usr/local/pgsql
> >
> > and have created "postgresadmin" for root
> > # adduser postgresadmin
> >
> > root can su postgresadmin without password
> >
> > Now I expect to add 'userA' to login as
> postgresadmin
> > with a password
> >
> > Can I perform following step to reach my goal;
> >
> > # adduser userA postgresadmin passwd xxx
> >
> > Kindly advise. TIA
> >
> > B.R
> > Stephen

_______________________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com.hk address at http://mail.english.yahoo.com.hk

In response to

Browse pgsql-general by date

  From Date Subject
Next Message j0rd1 adame 2004-07-05 18:31:07 Serials in where clause
Previous Message Tom Lane 2004-07-05 14:09:35 Re: Bug in function to_char() !!