Comment 1 for bug 162606

Revision history for this message
parvez (golam-parvez) wrote : Re: can not install postgresql-8.2 on amd 64 on ubuntu 7.04

For some useful information:
I am using NIS services for sharing account information. When postinstallation script of postgresql-common is running the following command

"if ! getent passwd postgres > /dev/null"

its giving the wrong information. So the following command is not executing properly

 adduser --system --quiet --home /var/lib/postgresql --no-create-home \
            --shell /bin/bash --group --gecos "PostgreSQL administrator" postgres

I already had user postgres in the shadowpassword. So the following command is giving the user id which is right

~# id -u postgres
1004

but postgres user is not assign to group postgres. Besically there was no group called postgres. So when postgresql-common installation script is checking for group id its getting wrong value. The following command is not getting the right value

~# id -g postgres
100

These commands are besically giving a totaly wrong output to the postgresql-common installation.
if [ "`id -g postgres`" -eq 0 ]; then
        echo "The postgres system user must not have root as primary group.
Please fix this and reinstall this package." >&2
        exit 1
    fi

Because of that the following command is not executing

` chown postgres:postgres /var/lib/postgresql`

and giving an error exit status 1 and which stopping the script to execute. As a result the whole installation is breaking down.

My other packages are depend on postgresql-8.2 package. So if it does not installed all other breakdown. So I hope you will do something about it. Possible add something to the script to overcome this situation. I will be very grateful to you if you solve this problem. Thanks