LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 05-03-2004, 11:34 PM   #1
xlord
Member
 
Registered: Mar 2002
Posts: 75

Rep: Reputation: 15
password protect zip files


I dont have the option -P enabled on my host, but i was wondernig if there was another way of password protecting zip files? like some kind of htaccess or something

os* rh, slack ( just incase )
 
Old 05-04-2004, 04:43 AM   #2
shedir
Member
 
Registered: Mar 2004
Location: Dresden, Germany
Distribution: Gentoo
Posts: 31

Rep: Reputation: 15
You could use openssl to encrypt the zip file.
 
Old 05-04-2004, 11:16 AM   #3
xlord
Member
 
Registered: Mar 2002
Posts: 75

Original Poster
Rep: Reputation: 15
hmm i never even tried that.. can you tell me how to do this.. or maybe a site on where i can read about this
 
Old 05-04-2004, 01:04 PM   #4
shedir
Member
 
Registered: Mar 2004
Location: Dresden, Germany
Distribution: Gentoo
Posts: 31

Rep: Reputation: 15
At first you should install openssl - the easiest would be to use the package that ships with your distribution. (Sources can be found on www.openssl.org)

To encrypt a file:
openssl enc -e -cipher -in clear file -out encrypted file
(The -e option is standard and therefor optional)

This will prompt for a password an encrypt the given file.
Without the "-in" and "-out" option openssl will read from stdin and write to stdout.

To decrypt a file:
openssl enc -d -cipher -in encrypted file -out clear file

The cipher (and mode) to be used must be specified. http://en.wikipedia.org/wiki/Block_c...s_of_operation gives a good introduction to block ciphers and the modes of operation. The blowfish cipher in cbc mode is a good choice ( "-cipher" = "-bf-cbc" or just "-bf" as cbc is the default).

The enc command of openssl has it's own man page ("man enc" or http://www.openssl.org/docs/apps/enc.html).
BTW: If security matters you should not specify the password on the commandline as it will be saved to you shell history and displayed by programs like ps.

Hope that helps
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
extracting from password protected zip files sanjith11 Linux - Software 4 03-21-2006 10:14 AM
Adding password to zip files with Ark? Cinematography Linux - Software 1 04-30-2005 04:42 PM
How do I extract password pretected .zip files in linux i_s Linux - General 2 03-25-2005 05:47 AM
How do I password protect folders/files? shodekiagari Linux - Software 6 12-04-2004 01:16 PM
ZIP files with password masand Linux - Software 2 11-14-2004 12:49 PM


All times are GMT -5. The time now is 11:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration