Asked By
allan cox
20 points
N/A
Posted on - 10/31/2011
How can I create a password protected Zip file in Unix and send it in email using Unix Script? When I tried the Zip – P, it gave me an error that the encryption was not supported. All I want is to provide a password in command line so I can use the script to zip the file and send it via email.
Answered By
lee hung
75 points
N/A
#98627
How to create Password Protected Zip File?
Hello Allan,
I think there is a way that you can password protect your zipped file in unix by going to the document's property settings. Try the following. The following are the other methods that you can use to encrypt your zipped file in unix:
-
By use of a GNU gpg command, which isa suit of cryptographic software for protecting files.
-
By using the mcrypt command which allows the file to be created with the extension.nc in the mode 600, so that when the original file has to be deleted, the -u parameter has to be specified. Example of how an mcrpt file will be saved is $ mcrypt file.txt.
-
You can also use the openssl which uses commandline cryptographic functions from the shelll libraryand allows you to encrypt and decrypt files with a password.
Hope this helps.
__
Regards
Lee Hung