#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2009
    Posts
    7
    Rep Power
    0

    Starting server as root


    Hi,

    I want to know whether there is any way to start the postgresql server as root.

    I know one has to switch to postgres user to start/stop the server.
    [su - postgres
    /usr/bin/postmaster -D /var/lib/pgsql/data
    etc.]

    I am curious to know root execution of postgresql server on the similar line of mysql server. Actually in our case, common server credentials(i.e. root user credential) are used for Postgresql and Mysql server.

    Best Regards,
    Ravish
  2. #2
  3. Modding: Oracle MsSQL Firebird
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2001
    Location
    Outside US
    Posts
    8,517
    Rep Power
    543
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2009
    Posts
    7
    Rep Power
    0
    Thanks for reply.

    We are using 8.2.3 version on linux. This version don't allow the root execution of server at least on linux.

    But more important, why?

    In our work we are using both postgresql and mysql server. And, we wish to start the postgresql and mysql server with common root credentials to avoid the storing of user name and password of individual database server.

    Best Regards,
    Ravish
  6. #4
  7. So help me Codd
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2008
    Location
    Brazil
    Posts
    362
    Rep Power
    30
    Offtopic: "We are using 8.2.3 version"

    You're 10 patch-releases behind, 8.2.13 is the latest release. Next week 8.2.14 will be released. Please install an update, your server is at risk. You could upgrade to 8.3 or 8.4, but you have to install a newer release.
  8. #5
  9. Modding: Oracle MsSQL Firebird
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2001
    Location
    Outside US
    Posts
    8,517
    Rep Power
    543
    Originally Posted by ravish
    ...

    But more important, why?

    In our work we are using both postgresql and mysql server. And, we wish to start the postgresql and mysql server with common root credentials to avoid the storing of user name and password of individual database server.

    Best Regards,
    Ravish
    Fine, but why do you want to extend a bad practice? Run both under the same non privileged user, that's the way to do it.

    Comments on this post

    • shammat agrees : No database should be run under the root account

IMN logo majestic logo threadwatch logo seochat tools logo