[Dbconfig-common-devel] Why does dbconfig-common use a none exiting local user

sean finney seanius at debian.org
Wed Jan 18 21:38:02 UTC 2006


hey uwe,

On Wed, Jan 18, 2006 at 06:27:52PM +0100, Uwe Steinmann wrote:
> I'm doing my first steps with dbconfig-common and got to the point
> where reading the source doesn't give me clue anymore.
> I've got a very basic postinst script with just the necessary stuff
> in it to create a postgresql database.
> The problem arises when the database is populated. dbconfig-common
> for some reason tries to use the database user as a system user
> doing things like
> 'chown -R user ...' and 'su -s /bin/sh evita -c ...'
> which fail because there is no such user.
> I wonder what triggers this behaviour. Do I have to create
> an equally named system user?

what's going on is there are two ways of accessing a postgres database
"out of the box": "password" and "ident" -based authentication.
"password" is what you'd expect... you give a username and password
just like with mysql and other systems.  "ident", on the other hand,
is a user-based authentication scheme where on the local host the server
checks that the owner of the communication socket is the user in question
(and for remote installs uses the insecure ident protocol).

i think by default the pgsql code in dbconfig-common is trying to use the
ident based setup, which is what's causing your problem.  you probably
want to go ahead and hint dbc to use the other one by default.  i think
you can do this (though i haven't documented it let alone tested it)
by setting dbc_authmethod_user and dbc_authmethod_admin both to
"password" in the config script, just before calling dbc_go.

later on, i'll see about adding either documentation or a more
straightforward way of doing so... but in the meantime i'd appreciate
it if you could report back whether that works...


    sean

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/dbconfig-common-devel/attachments/20060118/8bba1ef7/attachment.pgp


More information about the Dbconfig-common-devel mailing list