I'm trying to use the Solaris 10 "encrypt" command in a script. I want to encrypt a file called "database", but not using a keyfile, instead using a keyphrase. Running this from the cli requests the user to input "Enter key:" which is fair enough but I want to run this from a script. I've tried using heredocs but it doesn't work, always displaing the "Enter key:" request.
This is what I've got so far:
encrypt -a aes -i /database <<EncryptionKey
fredbloggs
EncryptionKey
chmod 400 /database
Anyone help please?
Thanks
Andy.