How to remove or recover password from a LibreOffice document
Solution 1
About LibreOffice encryption
I found 2 interesting links. From the links Libreoffice seems to use AES (http://en.wikipedia.org/wiki/AES_(cipher) ) as of LibreOffice 3.5. Before that it was blowfish.
- Aveesplace.wordpress
- According to LO mail archive (2012 so recent) a brute force with a Windows program called Accent Office will take:
Max pwd Accent OFFICE Length Time Estimate (same conditions) 5 27m03s 6 1d19h 7 173d3h 8 45y197d
Conclusions:
- AES has no known flaws.
- The only way is to provide the correct password. and you should always save an unencrypted copy on an external media like an USB disc that is kept safe in your house.
Solution 2
First, install xmlcopyeditor from the repositories. Open the content.xml file by right clicking the document from the file manager and choosing Archive Manager as the application.
Open content.xml with xml copy editor, press F11 to properly display the full document and find protected=true. Change it to false and your document will no longer me protected.
It's possible to edit the file with a text editor but it tends to choke and lock up your system for a while.
Solution 3
Although this thread appeared several years ago, the question is still pertinent for some. I arrived here because I was unable to identify a password I used on a LibreOffice document. Fortunately, I had a backup of my home directory in TimeShift and was able to upload the original unprotected file and save it to a USB with a new password. This may not work with all backup apps. Nonetheless, the lesson is the same: use TimeShift and regularly backup your files.
Related videos on Youtube
![Luis Alvarado](https://i.stack.imgur.com/HtZ3d.png?s=256&g=1)
Luis Alvarado
System Engineer Social Engineer Master in Pedagogy Master in Open Source CCNA Certified Linux Foundation Certified Former Askubuntu Moderator Stack Careers | Linkedin | Launchpad | Ubuntu Wiki - Random SE Stuff - Latin American Members | JC Race Award | Human Robot Award 74
Updated on September 18, 2022Comments
-
Luis Alvarado almost 2 years
I have 2 old documents in ODT format that I either made a typo or forgot the actual password for them. I want to recover the password or simply remove it. What steps (If available) are there to remove such password (and remind me of not put passwords to documents).
-
Admin over 8 years@Christopher uhm...
content.xml
is encrypted. And what would be the point of the encryption if disabling it were as easy as changingprotected
tofalse
? The file that actually contains information about the encryption used is found inMETA-INF/manifest.xml
. -
Admin over 8 yearsIt's to keep the typical user from changing protected areas. I've decrypted many documents by this method. I've passed on some protected spreadsheets to people; not expecting anything more than them not breaking the formulae.
-
-
Luis Alvarado over 11 yearsYes they were made with LibreOffice 3.5. I am pretty sure it was even older. Thanks for the answer. +1
-
Gelin Luo about 8 yearsthanks for the tip. I need to add comments to a protected xlsx file, I couldn't find the
protected=true
stuff but I do find the filexl/comments1.xml
. Updating the content in that file and then compress the files into xlsx, I got the comments added. -
loved.by.Jesus almost 5 yearsI have checked if this method is possible in a LibreOffice 6.1 password protected .odt file, and I could not display the
content.xml
file properly either withxmlcopyeditor
or any other editor, and, consequently, to look forprotected=true
was impossible. So it seems according to Rinzwind's answer that encrypted .odt files are secure enough. :) Therefore keep a copy of the unencrypted documents and a copy of the passwords in an external drive. -
David over 2 yearsLibreOffice 7.2.2.2. It worked perfectly. Note that if your document has more than one sheet you need to unprotect every sheet this way, so do a search and change the value multiple times. Thanks, Christopher