[SOLVED] Password Compression in Mint

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Danko8321

[SOLVED] Password Compression in Mint

Post by Danko8321 »

Hello, forum fellas, excuse my newbieness if it annoys you, but I have a question about compression in Mint: I know Mint (as well as many other Linux systems) has a great compression Tool, what I don't know is why it doesn't ask for a password twice before creating password protected archives. I know that It's probably more of me being used to Windows interface, but that double-password-checking feature has saved my PC environment from getting completely lost a lot more than just a couple times. I would love to have the same thing at Mint, because it makes me feel a lot safer (you know, the probabilities of making the same mistake twice are so low that I never even bother to worry about it). Anyway, thats pretty much all, Double-checking before password protecting in Mint/Linux.

PS: I don't mind if I have to compress trough a command-line, but I would appreciate if it could also be done in graphical mode; maybe something to tell the Development crew to add to Mint 12.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
xenopeek
Level 25
Level 25
Posts: 29597
Joined: Wed Jul 06, 2011 3:58 am

Re: Password Compression in Mint

Post by xenopeek »

IIRC, zip file passwords can be cracked relatively easily. I'm using GPG with strong encryption, in a backup script that I wrote. The command line for just zipping and encrypting is as follows. This asks you to give your password twice.

Code: Select all

zip -9 -r - TARGETS | gpg --symmetric --cipher-algo AES256 --output archive.zip.gpg
Where you replace TARGETS with the space separated list of files and folders. For example, if you want to backup with encryption just your Documents and Downloads folder, you would open a terminal and run:

Code: Select all

zip -9 -r - Documents Downloads | gpg --symmetric --cipher-algo AES256 --output archive.zip.gpg
At any time when you want to decrypt a file, you just run:

Code: Select all

gpg archive.zip.gpg
It will ask for your password, and create the original zip file which you can then unzip with a tool of your choice. GPG is also available on Windows and OSX, so you won't be locked in to using Linux (though you have to download the tool then).
Image
Danko8321

Password Compression in Mint

Post by Danko8321 »

Awesome Tool, but is doesn't seem to be what I was looking for; the compression algorithm is very capable, and seems more than just fairly safe, the thing is that it's syntax is very complex, and (even though I love the fact that it's harder to violate) for the kind of tasks I'm currently doing it seems like a bit to much of a trouble. I'll keep it very closely in mind, since it seems to be very good, but this is an Enterprise-Level compression tool, and right now I'm just at a KinderGarden-Level newbie :) , so It wouldn't be necessary. If you find something with a little lower complexity level (since I run Backups very often and it isn't sensitive data, I don't want to run such a large script), I'd be happy to hear it, if not, thanks for this one, it's really cool and it's definitively going to be useful in the future. :wink:
User avatar
xenopeek
Level 25
Level 25
Posts: 29597
Joined: Wed Jul 06, 2011 3:58 am

Re: Password Compression in Mint

Post by xenopeek »

Okay :D It seems very strange to me that the built-in archiver online asks for password once, that is sure to have caused problems for more people.

From the command line, zip with encryption does ask you to verify your password:

Code: Select all

zip -e -9 -r ARCHIVE TARGETS
Where you replace ARCHIVE with how you want your zipfile to be called, and TARGETS again by the space separated list of files and folders. The -e is for encrypting it, -9 for best compression and -r for including subfolders.
Image
Danko8321

Password Compression in Mint

Post by Danko8321 »

Yes, it is very troublesome, since if you make one tiny mistake on the process of writing the password you wont realise it, and then, if you want to decompress it, you'll have to try every possible keystroke combination that could have gone wrong (or simply use a brute force-method script, which is not nearly less annoying). Ok, this is a possible solution, the syntax is easy and I will remember (and use) it a lot of times, but, I don't know why its popping this error message and doesn't let me compress the file:

Code: Select all

maquiavelo@Maquiavelo ~ $ zip -e -9 -r XmodMap Xmodmap
Enter password: 
Verify password: 
	zip warning: name not matched: Xmodmap

zip error: Nothing to do! (try: zip -e -9 -r XmodMap . -i Xmodmap)
I already checked and the structure of the my prompt is correct (even tried to change a few things, like specifying the whole path to the directory), so I don't know what to try now. Any clues?
User avatar
xenopeek
Level 25
Level 25
Posts: 29597
Joined: Wed Jul 06, 2011 3:58 am

Re: Password Compression in Mint

Post by xenopeek »

Linux is case sensitive, the file Xmodmap can not be found. Try XmodMap, or check what the actually spelling is of the file.
Image
Danko8321

Password Compression in Mint

Post by Danko8321 »

It indeed worked, and you were right, it was about the Casing of the letters; thanks, marked as solved. :)
Locked

Return to “Beginner Questions”