I am looking for a way to make the mount command prompt for the password so my password doesn't show up in any system history, I thought I would have it run read -s -p
command inside of the mount command but I am not having any luck with it. I am wondering if my statement is wrong and how.
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)
Best Answer
A quick look at the manual page shows:
So, leave it unspecified, or set the PASSWD env var.