2

I installed postgres-9.2.13 and pgbouncer in my Linux machine. My db admin in "postgres" user. When I am trying to start postgres or pgbouncer respectively with the below commands, it is asking the root password and i am able to run the command only if I use "su root" before the command.

But I don't want it to be run only with the root user. How can I make my postgres user to be able to run the postgres service and pgbouncer service?

Shashikanth Komandoor
  • 781
  • 1
  • 11
  • 29
  • Your distribution may well limit starting and stopping system services to root. Which commands are you using to start or stop postgres and pgbouncer? – Andomar Jul 10 '15 at 10:07
  • $ service postgresql-9.2 start for starting postgresql and $ service pgbouncer start for starting pgbouncer – Shashikanth Komandoor Jul 10 '15 at 10:15
  • That will run `/etc/init.d/postgresql-9.2`, which will use `su -l postgres -c postmaster` to start `postgres` under the `postgres` account. So by running `service` as `root`, you start `postgres` as `postgres`. – Andomar Jul 10 '15 at 10:26

0 Answers0