[Pkg-postgresql-private] Re: Bug#224716: postgresql-client: createuser fails
Martin Pitt
martin@piware.de
Mon, 5 Jan 2004 23:17:41 +0100
--a8Wt8u1KmwUX3Y2C
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Hi Simon, hi others!
On 2003-12-21 13:17 +0000, simon raven wrote:
> (#:~)- createuser -E -U postgres -W nagios
> Shall the new user be allowed to create databases? (y/n) n
> Shall the new user be allowed to create more new users? (y/n) n
> Password:
> ERROR: parser: parse error at or near "NOCREATEDB" at character 61
> createuser: creation of user "nagios" failed
>=20
> it fails if i include the -E (encrypt password) option, otherwise it
> works as expected, if i do not include the -E option.
I debugged createuser.c and found the problem: giving the '-E' switch
alone is not sufficient, you also must set the '-P' option to prompt
for a password. '-W' asks for the password for connecting to the database,
not for the user to be created.
I fixed createuser to build a valid SQL string even if only '-E' is
given, it is just ignored then. Is that okay? I don't want to change
the semantics of the program too much away from the official version,
but I will send the patch to the original authors (Oliver: where to
send this at?).
I will soon commit the patch to the cvs, the next release will fix
that.
Thanks and have a nice day!
Martin
--=20
Martin Pitt Debian GNU/Linux Developer
martin@piware.de mpitt@debian.org
http://www.piware.de http://www.debian.org
--a8Wt8u1KmwUX3Y2C
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQE/+eKEDecnbV4Fd/IRAlvrAJ0Vd9cacFCyurK5B0v206jTgeK3uwCg1v5f
TSFoffQQEDihVd7XzwHzWVQ=
=NfLK
-----END PGP SIGNATURE-----
--a8Wt8u1KmwUX3Y2C--