I am writing the command in crontab and its output is first asking the password.
Is there any way to supply the password with command like
mount -a < password
I am writing the command in crontab and its output is first asking the password.
Is there any way to supply the password with command like
mount -a < password
Yes: with Expect http://wiki.tcl.tk/201 > http://en.wikipedia.org/wiki/Expect >.
Edit:
Seems like you must be mounting some type of remote filesystem. Those usually have special options that allow you to supply the password if you don't want to muck around with 'expect'. For samba, you can do this:
mount -t smbfs -o username=thisguy,password=abc123 //winserver/stuff /mnt/stuff
The username and password options can also be placed in your /etc/fstab
file in the column with the options like ro,rw,noauto, etc.