how to recover forgotten "owner password" of pdf file

1

1

I need to resize a pdf file to crop its surrounding white border. I can crop it using PDF-Shuffler on Ubuntu. But cant save the change, because of owner password protection. When i try to open that file using PDF-Editor, it asked for that password.

Since I dont know that owner password, so cant use regular recovery system. There are lots of online system too, but thats very slow process even most of those cant remove owner password. Now looking for a script/software specially for Ubuntu to remove that owner password.

Sadat

Posted 2012-05-01T15:43:04.327

Reputation: 123

Related: Removing the password from a PDF file and perhaps Is it true that strongly-password-protected PDF can be cracked?

– Ƭᴇcʜιᴇ007 – 2012-05-01T17:35:52.440

Answers

1

Ubuntu repositories have a tool called pdfcrack that can be installed using the package manager. This can attempt to brute-force (guess) the password for you.

Important note: in many countries the penalties for circumventing encryption are very severe. Be sure you have the legal right to crack the password before continuing.

Open a terminal and do something like this:

sudo apt-get install pdfcrack
pdfcrack -f MYFILE.PDF

dwurf

Posted 2012-05-01T15:43:04.327

Reputation: 293

In the USA you could be performing illegal activities if PDF cracking falls under the DMCA. While I don't think they're going to knock down your doors, it's important to know. Since I'm in Canada, I appreciate now knowing about pdfcrack, for those one-off's. – BloodyIron – 2012-05-01T16:43:23.627

@dwurf, thanks a lot. I will try it and remember your warning. – Sadat – 2012-05-01T17:23:41.300

@dwurf,pdfcrack cant detect OWNER PASSWORD PROTECTION. – Sadat – 2012-05-01T17:25:11.580

@Sadat from the website: - Supports cracking both owner and userpasswords

– dwurf – 2012-05-01T21:24:49.863

0

On Ubuntu you can use the following commands to decrypt PDFs with forgotten Owner Passwords trivially:

  1. Install package qpdf:

    sudo apt-get install qpdf
    
  2. Decrypt PDF:

    qpdf --decrypt encrypted_document.pdf decrypted_document.pdf
    

Notes:

  1. The above instructions assume that you are trying to decrypt a PDF with a forgotten Owner Password (i.e. you can open the PDF and view its content but are restricted from making changes, prints, etc. without the password). These types of encrypted PDFs are trivial to decrypt and don't require tools like pdfcrack or hashcat (dictionary/brute force password crackers)

  2. On the other hand a PDF with a forgotten User Password (i.e. you cannot view the content of the PDF without supplying the password) will require PDF dictionary/brute force password crackers and you are not always guaranteed to find the password. If however you do have the User Password and simply want to save a decrypted version of the PDF you can do this to with qpdf as follows:

    qpdf --password=ENTER_PASSWORD --decrypt encrypted_document.pdf decrypted_document.pdf
    
  3. Windows binaries of qpdf can also be downloaded from http://qpdf.sourceforge.net/

moo

Posted 2012-05-01T15:43:04.327

Reputation: 905