pg.ddx.io pgsql-docs@postgresql.org mailing list archive
help / color / mirror / Atom feedPostgreSQL 8.2.3 Documentation - createuser - echoed command
2+ messages / 2 participants
[nested] [flat]
* PostgreSQL 8.2.3 Documentation - createuser - echoed command
@ 2007-02-25 10:23 Halley Pacheco de Oliveira <halleypo@yahoo.com.br>
0 siblings, 1 reply; 2+ messages in thread
From: Halley Pacheco de Oliveira @ 2007-02-25 10:23 UTC (permalink / raw)
To: pgsql-docs
In the createuser command page is written:
To create the user joe as a superuser, and assign a password immediately:
$ createuser -P -s -e joe
Enter password for new role: xyzzy
Enter it again: xyzzy
CREATE ROLE joe PASSWORD 'xyzzy' SUPERUSER CREATEDB CREATEROLE INHERIT LOGIN;
CREATE ROLE
In the above example, the new password isn't actually echoed when typed, but we show what was typed for clarity. However the password will appear in the echoed command, as illustrated — so you don't want to use -e when assigning a password, if anyone else can see your screen.
But it is not always the truth.
When I use
$ createuser -P -s -N -e joe
I get:
Enter password for new role: xyzzy
Enter it again: xyzzy
CREATE ROLE joe PASSWORD 'xyzzy' SUPERUSER CREATEDB CREATEROLE INHERIT LOGIN;
CREATE ROLE
(same as in the documentation)
But when I use
$ createuser -P -s -E -e joe
(or don't use -N or -E) I get:
CREATE ROLE joe ENCRYPTED PASSWORD 'md5b5f5ba1a423792b526f799ae4eb3d59e' SUPERUSER CREATEDB CREATEROLE INHERIT LOGIN;
(the password is shown encrypted)
The last two examples were executed using a "createuser (PostgreSQL) 8.2.0" local.
But when I execute the createuser command from a remote machine using:
# createuser --version
createuser (PostgreSQL) 8.1.4
# createuser -h Kubuntu -U sistemas -P -s -E -e joe
I get:
CREATE ROLE joe ENCRYPTED PASSWORD 'xyzzy' SUPERUSER CREATEDB CREATEROLE INHERIT LOGIN;
(same as in the documentation, but different from the createuser 8.2.0 local)
I would like to know the reason of the difference. Is it being caused by the different versions of createuser?
The text is the same in the PostgreSQL 8.1.8 Documentation and in the PostgreSQL 8.2.3 Documentation, but it seems to me that the createuser behaviour is different in these versions.
Thanks,
Halley
__________________________________________________
Fale com seus amigos de graça com o novo Yahoo! Messenger
http://br.messenger.yahoo.com/
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: PostgreSQL 8.2.3 Documentation - createuser - echoed command
@ 2007-02-26 17:34 Bruce Momjian <bruce@momjian.us>
parent: Halley Pacheco de Oliveira <halleypo@yahoo.com.br>
0 siblings, 0 replies; 2+ messages in thread
From: Bruce Momjian @ 2007-02-26 17:34 UTC (permalink / raw)
To: Halley Pacheco de Oliveira <halleypo@yahoo.com.br>; +Cc: pgsql-docs
The -E/-N options control how the password is stored in the server, and
that is what you are seeing in different ENCRYPTED PASSWORD entries.
Generally, you should never use -N.
---------------------------------------------------------------------------
Halley Pacheco de Oliveira wrote:
> In the createuser command page is written:
>
> To create the user joe as a superuser, and assign a password immediately:
>
> $ createuser -P -s -e joe
> Enter password for new role: xyzzy
> Enter it again: xyzzy
> CREATE ROLE joe PASSWORD 'xyzzy' SUPERUSER CREATEDB CREATEROLE INHERIT LOGIN;
> CREATE ROLE
>
> In the above example, the new password isn't actually echoed when typed, but we show what was typed for clarity. However the password will appear in the echoed command, as illustrated ? so you don't want to use -e when assigning a password, if anyone else can see your screen.
>
> But it is not always the truth.
>
> When I use
>
> $ createuser -P -s -N -e joe
>
> I get:
>
> Enter password for new role: xyzzy
> Enter it again: xyzzy
> CREATE ROLE joe PASSWORD 'xyzzy' SUPERUSER CREATEDB CREATEROLE INHERIT LOGIN;
> CREATE ROLE
>
> (same as in the documentation)
>
> But when I use
>
> $ createuser -P -s -E -e joe
>
> (or don't use -N or -E) I get:
>
>
> CREATE ROLE joe ENCRYPTED PASSWORD 'md5b5f5ba1a423792b526f799ae4eb3d59e' SUPERUSER CREATEDB CREATEROLE INHERIT LOGIN;
>
> (the password is shown encrypted)
>
> The last two examples were executed using a "createuser (PostgreSQL) 8.2.0" local.
>
> But when I execute the createuser command from a remote machine using:
>
> # createuser --version
> createuser (PostgreSQL) 8.1.4
>
> # createuser -h Kubuntu -U sistemas -P -s -E -e joe
>
> I get:
>
> CREATE ROLE joe ENCRYPTED PASSWORD 'xyzzy' SUPERUSER CREATEDB CREATEROLE INHERIT LOGIN;
>
> (same as in the documentation, but different from the createuser 8.2.0 local)
>
> I would like to know the reason of the difference. Is it being caused by the different versions of createuser?
>
> The text is the same in the PostgreSQL 8.1.8 Documentation and in the PostgreSQL 8.2.3 Documentation, but it seems to me that the createuser behaviour is different in these versions.
>
> Thanks,
> Halley
>
>
>
>
>
> __________________________________________________
> Fale com seus amigos de gra?a com o novo Yahoo! Messenger
> http://br.messenger.yahoo.com/
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2007-02-26 17:34 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-02-25 10:23 PostgreSQL 8.2.3 Documentation - createuser - echoed command Halley Pacheco de Oliveira <halleypo@yahoo.com.br>
2007-02-26 17:34 ` Bruce Momjian <bruce@momjian.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox