LoginSignup
5
4

More than 5 years have passed since last update.

Oracleのユーザーのパスワードが正しいかをスクリプトで判定する

Posted at

SQL*Plusを使おう。

sqlplus -L -S hoge_user/$USER_PASSWORD <<< "exit" || { echo "wrong password"; exit 9 }
  • -L オプションを付けてパスワードの試行回数を 1 回だけとする。
  • 画面出力もいらないので -S オプションも付ける。
  • ログインが成功した場合は即行 "exit" で終了。
5
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
4