Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8711483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T04:53:24+00:00 2026-06-13T04:53:24+00:00

With a freshly installed version of Postgres 9.2 via yum repository on Centos 6,

  • 0

With a freshly installed version of Postgres 9.2 via yum repository on Centos 6, how do you run postgres as a different user when it is configured to run as ‘postgres:postgres’ (u:g) out of the box?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T04:53:25+00:00Added an answer on June 13, 2026 at 4:53 am

    This is only for a fresh installation (as it pertained to my situation) as it involves blowing away the data dir.

    The steps I took to resolve this issue while utilizing the packaged startup scripts for a fresh installation:

    1. Remove the postgres data dir /var/lib/pgsql/9.2/data if you’ve already gone through the initdb process with the postgres user:group configured as default.
    2. Modify the startup script (/etc/init.d/postgresql-9.2) to replace all instances of postgres:postgres with NEWUSER:NEWGROUP.
    3. Modify the startup script to replace all instances of postgres in any $SU -l postgres lines with the NEWUSER.
    4. run /etc/init.d/postgres initdb to regenerate the cluster using the new username
    5. Make sure any logs created are owned by the new user or remove old logs if error on initdb (the configuration file in my case was found in /var/lib/pgsql/9.2/data/postgresql.conf).
    6. Startup postgres and it should now be running under the new user/group.

    I understand this might not be what other people are looking for if they have existing postgres db’s and want to restart the server to run as a different user/group combo – this was not my case, and I didn’t see an answer posted anywhere for a ‘fresh’ install utilizing the pre-packaged startup scripts.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to to run my freshly installed apache solr on my server (CENTOS
My iPhone app has the following problem: Freshly installed, when I read out my
I've got problem with connecting to MySQL database on my freshly installed Windows 7
I've got problem with look of freshly installed Eclipse in my Ubuntu 10.04. The
I'm trying to install Graphics32 to my freshly installed Embarcadero RAD Studio XE. I
Is there some list of .dll files that are available on the various freshly-installed
My application which is built on VC++ 2008 , when run on a freshly
I have freshly installed Ubuntu OS , installed Eclipse and then added Android sdk
I was wondering if anyone could think of a reason why two freshly-installed Firefox
A freshly installed TFS 2010 is at http://serverX:8080/tfs . A Windows 7 developer machine

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.