Create and pw protect .tar files


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Create and pw protect .tar files
# 1  
Old 06-21-2005
Question Create and pw protect .tar files

Ok here at work I have been charged with finding a way to create a password protect .tar files from the command line. Now i have yet to actully sit down and learn UNIX yet, but that is one of my next todo's. Anyway my questions is I have been surfing in search of a solution and the closest answer I can come up with is get two programs, a compression program to make the .tar, then an encryption program for the password protect and write a script that runs them both. First question, is this the easiest way? Second question, where can I find said programs? Thanks for your time.

Chris
This User Gave Thanks to clovell For This Post:
# 2  
Old 06-21-2005
One set of answers:

q1: zip -e creates a password protected archive
unzip -P <password> unzips the file
q2: A lot of unix boxes have this installed. Otherwsie goto http://www.info-zip.org for a freely available version.
# 3  
Old 06-21-2005
I was told specificly that I need to find a way to do it with .tar files. They don't want to use Zip because the passwords aren't that secure. Or so I was told.

Ok so I apologize for not searching for this before I posted, but everywhere else I have gone I haven't seen a single thing about this. I see in another thread, and the suggestion was use the tar command in conjunction with PGP encryption for the password protection. My new question is this process scriptable, and is the encryption secure?

Last edited by clovell; 06-21-2005 at 05:06 PM..
# 4  
Old 06-21-2005
No offense, but I gather you're not a crypto person.

As soon as you said 'secure' I knew there may be a problem. Merely encrypting data with a good two-way encryption scheme does not make it secure. Procedures, physical security, SOX compliance procedures, audting, etc., all contribute to 'secure'.

I've worked with uninformed management, so I know they think having 'unbreakable' two-way encryption is all that's needed. They don't care if the passwords on all the files are the same, or if someone leaves the password taped to a console.

Unless security is more than encryption and includes a large array of things throughout your company, decent two-way encryption is is not going to mediate any security threats. And is just going to cuase you perosnally problems when people lock up files and can't open them.

FWIW: all two-way encryption schemes can be broken with the exception of the so-called one-time pad (Shannons' Theorem if you want to read about it). It might take several years of brute force attack, but they all can be broken.

Short answer: PGP can be broken, if that's what you mean. There are problems with the random number generators used for a lot of implmentations of it.

The (US) NSA currently deems triple-DES encryption schemes and some other related schemes as something we do not want the bad guys to get. ie., NSA has a difficult time with breaking them. So I would go with triple-DES.
# 5  
Old 06-21-2005
Nah I am just an intern doing what I was asked, they said that there are too many cracks out there designed just to crack password protected Zips that they dont want to use Zip format. I just shrug and try to find another way to get things done. From my research so far it seems that installing some type of encryption program and then writing a script, that first creates the .tar then encrypts it, seems the easiest and almost the only way to go about this. As far as security they are pretty strickt on pws here, not allowed to be written down or even spoken out loud. And each level has a different set of passwords. Yea well anyway just trying to get this solved cause I like going out and doing this stuff, the whole get a problem go out and find the best solution. Thanks for the advice so far though.

Last edited by clovell; 06-21-2005 at 06:14 PM..
# 6  
Old 06-22-2005
Some links:

Be sure to read the 'snake oil' FAQ
http://www.faqs.org/faqs/cryptography-faq/

Bruce Schnier has a lot to say but there are links to resources for software:
http://www.schneier.com/blog/

Matt Blaze's homepage is also good:
http://www.crypto.com/

Have fun....
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Create Tar files

Hi, the folder /home/nandy/test will have two files called notepad1 nodepad2 when i issued /home/nandy/test> tar -cvf componse.tar ./notepad1 ./notepad2 and no error /home/nandy/test> tar -cvf nan.tar . --> this creates nan.tar with the below message nan.tar same... (1 Reply)
Discussion started by: Nandy
1 Replies

2. Shell Programming and Scripting

How to create zip/gz/tar files for if the files are older than particular days in UNIX or Linux?

I need a script file for backup (zip or tar or gz) of old log files in our unix server (causing the space problem). Could you please help me to create the zip or gz files for each log files in current directory and sub-directories also? I found one command which is to create gz file for the... (4 Replies)
Discussion started by: Mallikgm
4 Replies

3. UNIX for Dummies Questions & Answers

Create Tar and GZip files under Unix

Hi All I have 2 tar files and inside a Gzip file (actually its folder) that i got from a Unix user to check the code for him and find some problem. I decompress the Tar file and use 7-ZIP to open the Gzip file and Extract all folders and files. I found the code problem and change it but now when... (1 Reply)
Discussion started by: giladboker
1 Replies

4. Shell Programming and Scripting

tar command to explore multiple layers of tar and tar.gz files

Hi all, I have a tar file and inside that tar file is a folder with additional tar.gz files. What I want to do is look inside the first tar file and then find the second tar file I'm looking for, look inside that tar.gz file to find a certain directory. I'm encountering issues by trying to... (1 Reply)
Discussion started by: bashnewbee
1 Replies

5. UNIX and Linux Applications

PAssword protect uploaded files

Hi, Is it possible to make sure/test that all uploaded files to my FTP will be of .RAR format (that's easy) but also password protected? Thanks (0 Replies)
Discussion started by: saariko
0 Replies

6. Shell Programming and Scripting

To write a shell script which groups files with certain pattern, create a tar and zip

Hi Guru's, I have to write a shell script which groups file names based upon the certain matching string pattern, then creates the Tar file for that particular group of files and then zips the Tar file created for the respective group of files. For example, In the given directory these files... (3 Replies)
Discussion started by: rahu_sg
3 Replies

7. Solaris

Find files older than x days and create a consolidated single tar file.

Hello, I need help in finding files older than x days and creating a single consolidated tar file combining them. Can anyone please provide me a script? Thanks, Dawn (3 Replies)
Discussion started by: Dawn Bosch
3 Replies

8. UNIX for Advanced & Expert Users

How to create a Tar of multiple Files in Unix and FTP the tar to Windows.

Hi, On my Unix Server in my directory, I have 70 files distributed in the following directories (which have several other files too). These files include C Source Files, Shell Script Source Files, Binary Files, Object Files. a) /usr/users/oracle/bin b) /usr/users/oracle... (1 Reply)
Discussion started by: marconi
1 Replies

9. Shell Programming and Scripting

tar with password protect

Hello All, i work with backup, The below script runs and tar the user specified dir and put it in a backup machine. can any one help me to modify this in such a was that the tar file generated can be given a users specific password so that it can have high security. KINDLY LET ME... (2 Replies)
Discussion started by: pradeepmacha
2 Replies

10. UNIX for Dummies Questions & Answers

Protect a tar file with a password!!

Hi there, I just want to know if there's anyway to protect any tar file with a password that requierd when somebody want to extract that tar. thanks in advance regards, Abdulkarim (1 Reply)
Discussion started by: geoquest
1 Replies
Login or Register to Ask a Question