Zip file with password protection


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Zip file with password protection
# 1  
Old 03-06-2009
Zip file with password protection

I am trying to zip a file with password protection.

I have read all or atleast most of the threads on the website, but couldn't come up with a solution.

I am running ZIP version 2.3 on HP-UX but I dont see the -P (password) option. I read somewhere that free versions of zip don't come with -P option. Can someone confirm this assumption. I have already wasted a weeks effort on this.

Can anyone suggest anyway of doing this, we are planning to send out an email (with attachment) to yahoo/gmail/outlook from our UNIX box but the file has to be password protected before it goes out. User will open the attachment from that email.
# 2  
Old 03-06-2009
If it's just a single file, why not use pgp or gpg to encrypt it? You could also use vi with the -x option to encrypt the file.

Other than that, use the crypt command:

Encode:
crypt Password < filename > filename.encrypted

Decode:
crypt Password < filename.encrypted > filename

Last edited by Autocross.US; 03-06-2009 at 04:52 PM..
# 3  
Old 03-06-2009
If I encode using pgp in UNIX, what software would the user have to use to open it in say MS-Word /Notepad ? Forgot to mention that the file is .txt.

From what I read, if I use crypt to encode the file, I have to use crypt to decode it too! cannot use that in Windows, or can I ?
# 4  
Old 03-09-2009
just to confirm, when you look at
man zip
it doesn't have the -P option?

and when you try to use zip with the -P option, it doesn't work?

When I got a free hosting account with Joyent which uses the Bash shell, the zip program it comes with has the -P option in the man page.
# 5  
Old 03-16-2009
I dont see the -P option when I check the man pages.

Thanks for your help zTodd
# 6  
Old 03-16-2009
pgp (as GNU gpg or "gpg") is supported for Windows and unix. It is free for both platforms.

The GNU Privacy Guard - GnuPG.org
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Zip a file with password

Hi, newbie to Linux, is there another way to zip a file with a password other than using 'zip' command? (7 Replies)
Discussion started by: mined
7 Replies

2. UNIX for Dummies Questions & Answers

password protect a CSV file: better solution than ZIP password?

Hi We send *.csv with sensitive data to our customers. Our customers open those files with Excel. A new requirement is that we password protect those CSV files. I thought to pack them with ZIP and assign a password to the archive. But Solaris 10 can't encrypt ZIP files. $ zip -P... (12 Replies)
Discussion started by: slashdotweenie
12 Replies

3. Shell Programming and Scripting

Password protection in unix

How to create a file in UNIX which is password protected ? Thanks and Regards, Neeraj (5 Replies)
Discussion started by: neeraj617
5 Replies

4. Shell Programming and Scripting

uuencode - .csv file password protection

HI, Can we add password protection for attachment of .CSV file in below command or any alternative solution. uuencode ../reports/gtsa_lmt_pb_rfs_daily.txt gtsa_lmt_pb_rfs_daily-$FILDTE.csv |mailx -s "gtsa_lmt_pb_rfs_daily" $MAILTO Many thanks regards, Sampath (4 Replies)
Discussion started by: Sampath.Rachcha
4 Replies

5. Shell Programming and Scripting

Password Protection using Term::ReadKey

Hi Friends, I execute a perl script with password as input but i wish not to print the password when i give the input. Instead when i provide the password it could be shown as "****" instead of original password. I know we can use Term::ReadKey or IO::Prompt for this, but just wanted to know if... (0 Replies)
Discussion started by: nmattam
0 Replies

6. AIX

How to zip file in AIX with password.

Hi Guru, I have assignment to create script to compress file as .ZIP with password. I don't know the command line in AIX. It's very new for me. I'm try to use zip or tar but I don't have any option for encrypt with password. Please kindly suggest me. Thank you very much. Multidev (7 Replies)
Discussion started by: multidev
7 Replies

7. Shell Programming and Scripting

Password protect a zip file

Hi, I'm working on Solaris 9 and i need to unzip a password protected zip, which i can do using zip -Ppassword filename however when i have done what i need to do with the file is to zip the file back up with a password. Zip on my system is version 2.3 and does not support this? How can... (0 Replies)
Discussion started by: Pablo_beezo
0 Replies

8. UNIX for Dummies Questions & Answers

Syntaxt to zip a file with password protection

Hi Experts, I am an SAP ABAP developer and compleatly stranger to unix and I need a help to extend a small peice of code. Our requirement is to zip a file with password protection in a specified directory. Following is the code I am using to zip a file ZZZZ.TXT. Here YYYY = is the path... (3 Replies)
Discussion started by: veeru4all
3 Replies

9. AIX

File password protection/encryption

Can it be done? Ive read in a few places that the crypt program no longer exists on AIX...if its do-able please tell me how. (2 Replies)
Discussion started by: rdudejr
2 Replies

10. UNIX for Advanced & Expert Users

Does unix has password protection for zip files?

How to set password in zip files under unix? There are password protection available in various os. Does unix has password protection for zip files? Is zip and gzip command has it? (6 Replies)
Discussion started by: p_prathaban
6 Replies
Login or Register to Ask a Question