CIFS共有をインストールするにはパスワードが必要です。

CIFS共有をインストールするにはパスワードが必要です。

私のパスワードがシステム履歴に表示されないように、インストールコマンドプロンプトでパスワードを求める方法を探しています。read -s -pインストールコマンド内でコマンドを実行する必要があると思いましたが、何もありません。運。私のステートメントが間違っているのか、どのように間違っているのか知りたいです。

mount -t cifs -o domain=domain.ad,user=thebtm,pass=$(read -s -p "password: ") "//NAS/thebtm$/" /mnt/cifsmount
password: mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

ベストアンサー1

マニュアルページを少し見てみると、次のことがわかります。

   password=arg
       specifies the CIFS password. If this option is not given then the
       environment variable PASSWD is used. If the password is not
       specified directly or indirectly via an argument to mount,
       mount.cifs will prompt for a password, unless the guest option is
       specified.

したがって、これを指定しないか、PASSWD環境変数を設定してください。

おすすめ記事