postgresql-8.1: home dir for user 'postgres'
Hi,
not sure if this lies in the backport or upstream, but thought I'd
start here.
I start with a clean sarge system, and
# apt-get -t sarge-backports install postgresql-8.1 postgresql-8.1-doc \
postgres-common
This works fine, but the home directory for user 'postgres' is not
created. That is the bug I think.
# grep postgres /etc/passwd
postgres:x:31:32:postgres:/var/lib/postgres:/bin/sh
# ls /var/lib/postgres
ls: /var/lib/postgres: No such file or directory
It is created by postgresql (7.4) for sarge.
On a sarge different system with postgresql installed, I tried to install
postgresql-8.1. I got conflicts and had to remove postgresql, all fine.
However I had to manually purge /var/lib/postgres, it did not
get cleaned out by the postgres postinst.
And upon install of postgresql-8.1, /var/lib/postgres was not created.
Bug reports (eg http://bugs.debian.org/369368) show that
the home for postgres may have moved to /home/postgres, but that
directory wasn't created either (and it's not safe to assume /home
exists).
To summarize: I think there is a bug, and it is either
a) postgresql-8.1 does not create home dir for user postgres
b) postgresql-8.1 does not enter correct home dir for user postgres in
/etc/passwd.
Possibly related: we have a NIS account named 'postgres', with a different
uid. However /etc/nsswitch.conf is set up to handle this correctly, so I
don't see how that could contribute to the problem
# grep passwd /etc/nsswitch.conf
passwd: files nis
# grep group /etc/nsswitch.conf
group: files nis
# id postgres
uid=31(postgres) gid=32(postgres) \
groups=32(postgres),112(ssl-cert),4100(postgres)
Cheers
Vince
Reply to: