Linuxのsudoコマンドについて質問です。


-pで、パスワードのプロンプトをカスタマイズできると、manに書いてありますが、書き方が理解できませんでした。

サンプルか、使用例をご教授願い致します。

回答の条件
  • 1人2回まで
  • 登録:
  • 終了:2011/03/18 02:17:11
※ 有料アンケート・ポイント付き質問機能は2023年2月28日に終了しました。

ベストアンサー

id:monyot No.1

回答回数146ベストアンサー獲得回数18

ポイント43pt

こんな感じでどうでしょうか。

$ sudo -p "Enter %u's password: " su

We trust you have received the usual lecture from the local System

Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.

#2) Think before you type.

#3) With great power comes great responsibility.

Enter monyo's password:

id:nasust

理解できました。ありがとうございます。

2011/03/18 02:14:16

その他の回答1件)

id:monyot No.1

回答回数146ベストアンサー獲得回数18ここでベストアンサー

ポイント43pt

こんな感じでどうでしょうか。

$ sudo -p "Enter %u's password: " su

We trust you have received the usual lecture from the local System

Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.

#2) Think before you type.

#3) With great power comes great responsibility.

Enter monyo's password:

id:nasust

理解できました。ありがとうございます。

2011/03/18 02:14:16
id:deflation No.2

回答回数1036ベストアンサー獲得回数126

ポイント35pt

たとえばプロンプトを hoge にしたければ

sudo -p hoge コマンド

のように入力します。

id:nasust

なるほど、了解しました。

2011/03/18 02:13:09

コメントはまだありません

この質問への反応(ブックマークコメント)

「あの人に答えてほしい」「この質問はあの人が答えられそう」というときに、回答リクエストを送ってみてましょう。

これ以上回答リクエストを送信することはできません。制限について

回答リクエストを送信したユーザーはいません