Thread: Postgres user
Hi, I have just installed postgresql on red hat. To use psql command i have to do su postgres. But i can only do su postgres when I log on as root. When I logon as other user and do su postgres, it asks for password and i dont know what that is. Is it always to be run as root only or I can run it as normal user? -Varsha _________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com
Most installations I've seen have you setup a postgres user. Potentially this is already setup in redhat as a system account, in which case, I believe just setting a password for it as root should do the trick, and let you login. -----Original Message----- From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Varsha Agarwal Sent: Thursday, July 25, 2002 7:00 PM To: pgsql-general@postgresql.org Subject: [GENERAL] Postgres user Hi, I have just installed postgresql on red hat. To use psql command i have to do su postgres. But i can only do su postgres when I log on as root. When I logon as other user and do su postgres, it asks for password and i dont know what that is. Is it always to be run as root only or I can run it as normal user? -Varsha _________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly
You can start postmaster as any under priveledged user. all you do is start the database server here is what i use in a start up script as you see i su from root to me then specify the command and any additional arguments #!/bin/bash HOME=/usr/local/pgsql LOG=$HOME/logs/postgres.log DATA_DIR=$HOME/db USER=darren ulimit -SHc unlimited su $USER -c "nohup $HOME/bin/postmaster -i -D $DATA_DIR $@ >$LOG 2>&1 </dev/null&" So as you see you do not need to be root or postgres. HTH On Thu, 25 Jul 2002, Gavin M. Roy wrote: > Most installations I've seen have you setup a postgres user. > Potentially this is already setup in redhat as a system account, in > which case, I believe just setting a password for it as root should do > the trick, and let you login. > > -----Original Message----- > From: pgsql-general-owner@postgresql.org > [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Varsha Agarwal > Sent: Thursday, July 25, 2002 7:00 PM > To: pgsql-general@postgresql.org > Subject: [GENERAL] Postgres user > > Hi, > I have just installed postgresql on red hat. To use psql command i have > to > do > su postgres. > But i can only do su postgres when I log on as root. When I logon as > other > user and do su postgres, it asks for password and i dont know what that > is. > Is it always to be run as root only or I can run it as normal user? > -Varsha > > > > _________________________________________________________________ > Chat with friends online, try MSN Messenger: http://messenger.msn.com > > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org > -- Darren Ferguson
varsha_agarwal@hotmail.com ("Varsha Agarwal") wrote in news:F142vO0zND3oV4AS24O0001adcc@hotmail.com: > Hi, > I have just installed postgresql on red hat. To use psql command i > have to do > su postgres. > But i can only do su postgres when I log on as root. When I logon as > other user and do su postgres, it asks for password and i dont know > what that is. Is it always to be run as root only or I can run it as > normal user? -Varsha > > > After you su to postgres you should create a postgres user with the createuser command. The user you create should be an existing system user that you want to authorize to use postgres commands. Mark -----------== Posted via Newsfeed.Com - Uncensored Usenet News ==---------- http://www.newsfeed.com The #1 Newsgroup Service in the World! -----= Over 100,000 Newsgroups - Unlimited Fast Downloads - 19 Servers =-----