Skip site navigation (1) Skip section navigation (2)

Re: Remove Postgres from Solaris 10

From: Robert Lor <Robert(dot)Lor(at)Sun(dot)COM>
To: "Jignesh K(dot) Shah" <J(dot)K(dot)Shah(at)Sun(dot)COM>
Cc: Thomas Bräutigam <thomas(dot)braeutigam(at)nexustelecom(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: Remove Postgres from Solaris 10
Date: 2008-04-29 20:48:14
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
There are a couple of options you can take to accomplish this.

1) Remove the role by running ¨roledel postgres¨ . This will remove 
postgres from /etc/passwd and /etc/user_attr, and you can use useradd to 
add postgres as a user.

2) Modify ¨postgres¨ from being a role to user. Below are the steps I use:

    a) run ¨passwd -d postgres¨
    b) edit /etc/user_attr and change type for ¨postgres¨  from ¨role¨ 
to ¨user¨
    c) create a home dir for postgres if needed
    d) use the usermod command to change the home dir and shell


Jignesh K. Shah wrote:
> I guess what you mean is to remove the "role" postgres so that you can 
> redefine it as a normal user and not remove the binaries that are 
> installed with Postgres as they can be overridden by having right PATH 
> variables
> Its easy... Modify /etc/user_attr and remove type=role from the 
> postgres line and modify /etc/passwd to set a home path and change 
> default shell to /bin/sh or /bin/bash and set password for it.. and 
> now you have a normal user..
> Is this what you are trying to do?
> -Jignesh
> Thomas Bräutigam wrote:
>> Hello all,
>> I have a software solution with a postgres database. The user 
>> postgres is abolutly needed for my software.
>> With Solaris 10, Postgres is automatically installed and uses the 
>> user postgres. How can I easily remove the current postgres install 
>> from this Solaris 10? Is there a process which is provided from 
>> Solaris to remove it? Whats the best way to do it?
>> Thank you for your help.
>> Cheers Thomas
>> ** 

In response to

pgsql-admin by date

Next:From: Ian WestmacottDate: 2008-04-29 21:05:03
Subject: Re: 8.1.8 autovacuum missing databases
Previous:From: Alvaro HerreraDate: 2008-04-29 20:33:35
Subject: Re: 8.1.8 autovacuum missing databases

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group