473,378 Members | 1,383 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

How to add an userA to login postgresadmin

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

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 23 '05 #1
2 1745
stephen,
try adding the user like you normally would. Did you know the system users and database users are not necessarily the same person? With that in mind, 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
HOWEVER, it would have been simpler to simply use the 'postgres' system account as it is the universal default

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

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 23 '05 #2
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

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: koolyio | last post by:
Hey, could you please tell me what is wrong with my login script. I just started learning php. CODE: login.php <? session_start(); header("Cache-Control: private"); ?>
5
by: Simon | last post by:
Hi, I have a Login.php page that logs the user in and out. I has two forms within the page, (depending on what we are trying to do), either one to log in or out. The form calls itself using a...
1
by: Tom Jones | last post by:
Hi, I am using the HttpWebRequest and HttpWebResponse classes to pull information from a web server on the internet. I have an account on one of the webservers that I need to log into...
2
by: Beginner | last post by:
I know this is an old question, but searching all over the internet plus several MS security conferences, still haven't got a straight anwser. Basically, the login.aspx is on one dedicated server...
4
by: nicholas | last post by:
Hi, Got an asp.net application and I use the "forms" authentication mode defined in the web.config file. Everything works fine. But now I would like to add a second, different login page for...
0
by: ruju00 | last post by:
I am getting an error in Login() method of the following class FtpConnection public class FtpConnection { public class FtpException : Exception { public FtpException(string message) :...
1
by: Friends | last post by:
Hi I need to set security for row level but not based on Database user's login. It should be based on the user table login. For the particular user I need to allow only the particular records to...
6
by: AppleBag | last post by:
I'm having the worst time trying to login to myspace through code. Can someone tell me how to do this? Please try it yourself before replying, only because I have asked this a couple of times in...
13
by: Apostle | last post by:
Hi all, after thinking for sometimes, I thought it will be great opportunity to learn if I will start from scratch and build my own register/login system. Here is the thread that I will be posting...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.