【システム上のpostgresユーザにパスワードを設定】
[root@linux ~]# passwd postgres ← システム上のpostgresユーザにパスワード設定
Changing password for user postgres.
New password: ← パスワード応答※表示はされない
Retype new password: ← パスワード応答(確認)※表示はされない
passwd: all authentication tokens updated successfully.
【PostgreSQL上のpostgresユーザにパスワードを設定】
[root@linux ~]# su - postgres ← postgresユーザになる
-bash-3.00$ psql template1 ← psqlコマンドでPostgreSQLに接続
Welcome to psql 7.4.2, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit
template1=# alter user postgres with password 'パスワード'; ← PostgreSQL上のpostgresユーザにパスワード設定
ALTER USER ← パスワードが変更された
template1=# \q ← psqlコマンド終了
-bash-3.00$ exit ← rootユーザに戻る
|
|