Security should be an issue of concern when creating documents with sensitive content, especially if these documents are to be sent by e-mail or various other applications. An insecure document only exposes the contents of curious and often interested eyes to obtain undeserved advantages. Both PDF and office documents can be secured through passwords that prevent them from being opened and / or edited.
The procedure is extremely simple, but, either through negligence or from the idea that passwords can be broken anyway, many users risk unnecessarily, leaving the contents of documents available to anyone who falls into their hands. They can thus end up in dangerous or at least embarrassing situations, for example, someone with a sense of humor can make changes to the original content or use important information in their own interest, without the author's consent. Indeed, passwords can be broken and we will see how, but if they are complex, the curious will take an eternity to do so. He may end up losing his temper, especially if he doesn't have a very powerful computer.
To password a PDF file that you export from LibreOffice, go to File --> Export PDF
. From here, click on the "Security" tab. On the left, we will click on the "Set passwords" button. The new window that will open gives us the opportunity to set a password for opening the document but also a password for editing permissions. We may or may not allow printing and resolution plus many others. If you really want security, set complex passwords that contain both lowercase, uppercase and numbers. Avoid names, dictionary words or passwords like " 123456", as these are the easiest to break. After setting the password / passwords, click OK, then Export.
Even when we save a document in any Office format we have the possibility to password it, both for opening and for editing. Thus, we can offer it to someone for viewing, but we can not allow it to be edited. To do this, go to File -> Save as. In the dialog box that will open, after naming the document and choosing its location, all you have to do is go to the lower left corner, under "File type", and check the box next to "Save with password". Then click on Save. A new dialog box will open where, in the two fields at the top, we will write the password for opening twice. We can give OK and we will have a password password when opening or we can click on "More options", to the left of OK. There we can check the box next to "Open file read-only" to open the file for read-only, leaving the user to edit it by clicking the "Edit file" button on the top toolbar. Or we can block editing by setting a password. Thus, the document will not be editable unless the user knows that password. The rule for setting a complex password also remains valid here.
If you have created an important document and passworded it but have lost your password, there is also the possibility of breaking that password. If it's a simple one, the problem is solved quickly, but if you were careful (not enough, because you lost your password), you will need a lot of patience. The method is very simple and consists of installing and then running the " pdfcrack
" application , available on Debian, Ubuntu and their derivatives. This is done by typing the following command in the Terminal and then giving Enter:
sudo apt-get install pdfcrack
Type the password when prompted and enter. You already know that in the Terminal it does not display dots or stars when you type the password. Then open the Terminal containing the pdf document (only works with PDFs) password. You can navigate to that folder using the "cd" command in the terminal, or, from the file manager, right click on the folder in question and choose "Open in Terminal
" if you have this option. Then write the following command in the Terminal:
pdfcrack -f filename.pdf
All you have to do is replace it filename.pdf
with the " " file name, which also contains the .pdf extension, and then press Enter and exercise patience.
We do not assume responsibility for the way it is used pdfcrack, the purpose of mentioning it and the instructions for use being only informative.